selfboot / AnnotatedShadowSocks

Annotated shadowsocks(python version)
Other
3 stars 1 forks source link

What a pid file do #24

Open selfboot opened 7 years ago

selfboot commented 7 years ago

A Pid-File is a file containing the process identification number (pid) that is stored in a well-defined location of the filesystem thus allowing other programs to find out the pid of a running script.

This has various uses, you can read it and check that the process is still running and take appropriate action or read it and kill the process.

The normal location for pid file is /var/run. Most unices will clean this directory on boot; under Ubuntu this is achieved by /var/run an in-memory filesystem (tmpfs). In any case, make it easy (command-line option) for the distributor or administrator to change the pid file location.

Ref
What is a .pid file and what does it contain?
Must my pidfile be located in /var/run?
What are pid and lock files for?