Changi NNTP Server 1.0

[ Bottom of Page | Previous Page | Next Page | Table of Contents ]

PID Files

PID files are created by CHANGI.EXE, CHANX.EXE and EXPIRE.EXE. By default, PID files are stored in CHANGIWORKDIR and named CHANGI.PID, CHANX.PID or EXPIRE.PID resp. They are used to avoid running more than one instance of those programs, which created the file. You may overwrite the default name of the PID file by setting CHANGIPIDFILE, CHANXPIDFILE or CHANGIEXPIREPIDFILE.

Upon startup the program tries to open its PID file in write mode. If this fails, the program will terminate with error 8. In case of success, the program will keep the file open until it has finished and disable other instances from opening the file in write mode again. On termination the program will remove the PID file, unless it has been terminated by a runtime error (program bug) or an immediate abort. Note, that interrupting a program by pressing Ctrl+C on the keyboard or closing its session window is considered a normal termination and the program will remove its PID file. This is also true for system shutdown.

The contents of the file is the id of the process which currently holds the lock, followed by a carriage-return and a linefeed character.


[ Top of Page | Previous Page | Next Page | Table of Contents ]


URL: changi/manual/pidfile.html
Created: 9 October 1996
Revised: 11 December 1996
Author: harald@os2point.ping.de