do not fail hard if pid file is not writeable in inetd mode

This commit is contained in:
Radim Kolar 2020-05-23 21:18:13 +02:00
parent 14cf90774a
commit 0e87ba32bb
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
Version NEXT
display port number if we can't listen on it
minor whitespace cleanup
do not fail hard if we can't write to pid file and running from
inetd
Version 2.8.1b29 - 24 Aug 2019
added scons command line argument without-fspscan=yes for building

View File

@ -324,7 +324,7 @@ int main (int argc, char ** argv)
new pid to it after we setuid()+fork()
*/
#ifndef LAMERPACK
if (pidfile(pidlogname)) {
if (! inetd_mode && pidfile(pidlogname)) {
fprintf(stderr,"Error: can not write pidfile %s - exiting.\n",pidlogname);
exit(8);/* cannot write pid file - exit */
}