delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/02/03:43:17

From: ianc AT kiwiplan DOT co DOT nz (Ian Collins)
Subject: Alive processes
2 Oct 1998 03:43:17 -0700 :
Message-ID: <AC4D3D80B239D211BC140000F879A2BA91.cygnus.gnu-win32@NTMAIL>
Mime-Version: 1.0
To: "Gnu-Win32 (E-mail)" <gnu-win32 AT cygnus DOT com>

How do you programmatically detect if a gnu process is still alive?
On other Unix's I have performed some of the following,

: Performed a popen of the command "ps -p 12345" and read the output.
(Won't easily work for gnu-win32).

: sent a kill -SIGUSR1 to the process, and check for an error coming
back (have to be same user).

: Looked for a directory in /proc (for Linux/svr4 Unixes, but not
gnu-win32).

: Read the kernel memory (hairy coding!).

What would be the best way to do this under gnu-win32?
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019