write pid file name in case of error

add exit code 8 if we cant open pid file
This commit is contained in:
Radim Kolar 2019-08-24 11:41:48 +02:00
parent 2a09e1a5ba
commit 6cea580821
3 changed files with 8 additions and 3 deletions

View File

@ -3,6 +3,8 @@ Version 2.8.1b29 - Not Released yet
without fspscan
do not install shell scripts if no clients are installed
support for user supplied examplesdir
display pidfile name in case we can not write to it
add error exit 8 if we can't write pid file
Version 2.8.1b28 - 16 Aug 2019
Pull scons site Python 3 fixed from fsplib and fspclient projects
More scons with python 3 build fixes

View File

@ -1,4 +1,4 @@
.TH FSPD 1 "Mar 2005" FSP
.TH FSPD 1 "Aug 2019" FSP
.SH NAME
fspd, in.fspd \- File Service Protocol (FSP) server
.SH SYNOPSIS
@ -205,6 +205,9 @@ can not change directory to homedir
.B 7
select() error
.B 8
can not write pidfile
.B 99
Internal terror

View File

@ -324,8 +324,8 @@ int main (int argc, char ** argv)
*/
#ifndef LAMERPACK
if (pidfile(pidlogname)) {
fprintf(stderr,"Error: can not write pidfile - exiting.\n");
exit(1);/* cannot write pid file - exit */
fprintf(stderr,"Error: can not write pidfile %s - exiting.\n",pidlogname);
exit(8);/* cannot write pid file - exit */
}
#endif
init_htab();