projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e3220ca
)
Complain if pid file cannot be created.
author
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 27 Nov 2003 23:24:59 +0000
(23:24 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 27 Nov 2003 23:24:59 +0000
(23:24 +0000)
src/process.c
patch
|
blob
|
history
diff --git
a/src/process.c
b/src/process.c
index
a5abc93
..
4eb1cd8
100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: process.c,v 1.1.2.7
6 2003/10/06 16:13:08
guus Exp $
+ $Id: process.c,v 1.1.2.7
7 2003/11/27 23:24:59
guus Exp $
*/
#include "system.h"
*/
#include "system.h"
@@
-257,8
+257,10
@@
static bool write_pidfile(void)
}
/* if it's locked, write-protected, or whatever */
}
/* if it's locked, write-protected, or whatever */
- if(!write_pid(pidfilename))
+ if(!write_pid(pidfilename)) {
+ fprintf(stderr, _("Could write pid file %s: %s\n"), pidfilename, strerror(errno));
return false;
return false;
+ }
return true;
}
return true;
}
@@
-335,8
+337,10
@@
bool detach(void)
/* Now UPDATE the pid in the pidfile, because we changed it... */
/* Now UPDATE the pid in the pidfile, because we changed it... */
- if(!write_pid(pidfilename))
+ if(!write_pid(pidfilename)) {
+ fprintf(stderr, _("Could not write pidfile %s: %s\n"), pidfilename, strerror(errno));
return false;
return false;
+ }
#else
if(!statushandle)
exit(install_service());
#else
if(!statushandle)
exit(install_service());