Re: Safe Way to Tell if Process is Running

2012-12-04 Thread Steve O'Hara-Smith
On Tue, 04 Dec 2012 14:50:38 -0600 Martin McCormick wrote: > Robert Bonomi writes: > > 'man 2 kill' tells all. > > I believe that is the first or second time I have used > Section 2. I appreciate the reminder. It looks like ps -p ### > >/dev/null appears to do what I need without producin

Re: Safe Way to Tell if Process is Running

2012-12-04 Thread Martin McCormick
Robert Bonomi writes: > 'man 2 kill' tells all. I believe that is the first or second time I have used Section 2. I appreciate the reminder. It looks like ps -p ### >/dev/null appears to do what I need without producing output ps -p 54321 >/dev/null && date ran the date command if there

Re: Safe Way to Tell if Process is Running

2012-12-04 Thread Martin McCormick
Robert Bonomi writes: > 'man 2 kill' tells all. I believe that is the first or second time I have used Section 2. I appreciate the reminder. It looks like ps -p ### >/dev/null appears to do what I need without producing output ps -p 54321 >/dev/null && date ran the date command if there

Re: Safe Way to Tell if Process is Running

2012-12-04 Thread Robert Bonomi
> Subject: Safe Way to Tell if Process is Running > Date: Tue, 04 Dec 2012 13:39:41 -0600 > From: Martin McCormick > > About 20 years ago, I saw some code in which you > verified whether or not a process was running by giving it a > kill -0 command. If the process

Safe Way to Tell if Process is Running

2012-12-04 Thread Martin McCormick
About 20 years ago, I saw some code in which you verified whether or not a process was running by giving it a kill -0 command. If the process was running, nothing happened to it but your kill -0 command exited with a 0 status. If there was no process with that PID, the kill command exited n