Wiki2
pidfile

pidfile

Pidfiles are used to know the pid of a specific program. See man pidfile(3) file for more info.

See following example to see how it could be used.

$ cat /var/run/syslog.pid  
37964
$ ps 37964; echo $?        
  PID TT  STAT       TIME COMMAND
37964 ??  Isp     0:00.03 syslogd: [priv] (syslogd)
0
$ ps 12345; echo $? 
  PID TT  STAT       TIME COMMAND
1