Killing a windows process

Discussion in 'Ruby' started by Joe Van Dyk, Oct 28, 2006.

  1. Joe Van Dyk

    Joe Van Dyk Guest

    Hi,

    I'm starting a bunch of processes using win32/process
    (http://rubyforge.org/projects/win32utils/). I want to be able to
    kill some of those processes. In *nix, I'd send them a TERM signal.
    What's the Windows equivalent?

    Thanks,
    Joe
     
    Joe Van Dyk, Oct 28, 2006
    #1
    1. Advertising

  2. signal = 4 # or 9 if you really want to take it out :)
    Process.kill signal, pid

    pth

    On 10/27/06, Joe Van Dyk <> wrote:
    > Hi,
    >
    > I'm starting a bunch of processes using win32/process
    > (http://rubyforge.org/projects/win32utils/). I want to be able to
    > kill some of those processes. In *nix, I'd send them a TERM signal.
    > What's the Windows equivalent?
    >
    > Thanks,
    > Joe
    >
    >
     
    Patrick Hurley, Oct 28, 2006
    #2
    1. Advertising

  3. Joe Van Dyk

    Guest

    I'm using win32/process's Create function to start a new Windows
    process.

    However, if I do a Process.kill(0, <pid>) to a program that I started
    via Ruby, it always returns back an array with the pid in it, even if
    the process was killed.

    Any ideas?

    Thanks,
    Joe

    Patrick Hurley wrote:
    > signal = 4 # or 9 if you really want to take it out :)
    > Process.kill signal, pid
    >
    > pth
    >
    > On 10/27/06, Joe Van Dyk <> wrote:
    > > Hi,
    > >
    > > I'm starting a bunch of processes using win32/process
    > > (http://rubyforge.org/projects/win32utils/). I want to be able to
    > > kill some of those processes. In *nix, I'd send them a TERM signal.
    > > What's the Windows equivalent?
    > >
    > > Thanks,
    > > Joe
    > >
    > >
     
    , Nov 10, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sting

    killing a process in ms windows - newbie

    Sting, Dec 28, 2003, in forum: C Programming
    Replies:
    2
    Views:
    338
    Richard Bos
    Dec 29, 2003
  2. Stephen Boulet

    killing a process in windows

    Stephen Boulet, Oct 17, 2003, in forum: Python
    Replies:
    1
    Views:
    333
    Stephen Boulet
    Oct 17, 2003
  3. Jani Yusef
    Replies:
    1
    Views:
    310
    omission9
    Jul 1, 2004
  4. Thomas Nelson

    Trouble killing a process on windows

    Thomas Nelson, Jun 2, 2007, in forum: Python
    Replies:
    4
    Views:
    328
    Tim Golden
    Jun 3, 2007
  5. News123

    killing own process in windows

    News123, Mar 7, 2010, in forum: Python
    Replies:
    4
    Views:
    760
    News123
    Mar 7, 2010
Loading...

Share This Page