.\" $Ringlet: perl/sys/stalepid/stalepid.1,v 1.2 2003/12/04 14:09:09 roam Exp $ .\" .Dd December 4, 2003 .Dt STALEPID 1 .Os .Sh NAME .Nm stalepid .Nd check for and remove stale process ID files .Sh SYNOPSIS .Nm .Op Fl 5bdhV .Ar pidfile .Ar processname .Sh DESCRIPTION The .Nm utility was developed to facilitate the startup of servers that write their process ID to a file and refuse to start if that file exists (e.g. when the process was last terminated by an unclean shutdown, or simply killed without given the chance to clean up the process ID file). The .Nm utility is used to check for and possibly remove those stale process ID files. Upon its invocation, .Nm checks for the following conditions: .Pp .Bl -dash .It the file specified by the .Ar pidfile argument exists; .It it contains a single line, and the line contains a single number; .It there is .Em no process with the process ID specified in the file, or if there is one, it is .Em not named .Ar processname . .El .Pp If all those conditions are met, the .Nm utility will remove the file specified by the .Ar pidfile argument, thus allowing the next invocation of the server to proceed normally. .Pp The following options are available: .Bl -tag -width indent .It Fl 5 Invoke the .Xr ps 1 utility using System V syntax instead of BSD .Xr ps 1 syntax (not implemented yet). .It Fl b Invoke the .Xr ps 1 utility using BSD syntax (the default behavior). .It Fl d Display diagnostic information during the course of operation. .It Fl h Display a short help message and exit. .It Fl V Display program version information and exit. .El .Sh ENVIRONMENT Not taken in consideration in the present version. .Sh FILES None relevant in the present version. .Sh BUGS Support for System V .Xr ps 1 syntax via the .Fl 5 flag is not implemented yet. .Sh HISTORY The .Nm was developed by .An Peter Pentchev in 2003. .Sh AUTHORS .An Peter Pentchev Aq roam@ringlet.net .