Safe Way to Tell if Process is Running

Martin McCormick martin at x.it.okstate.edu
Tue Dec 4 20:50:40 UTC 2012


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 was
a process with that number and produced nothing if no process
54321 existed.

Martin


More information about the freebsd-questions mailing list