projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Write pidfile AFTER detaching...
[tinc]
/
src
/
process.c
diff --git
a/src/process.c
b/src/process.c
index
264b21d
..
29e49fa
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.
9 2000/11/22 17:49:16 zarq
Exp $
+ $Id: process.c,v 1.1.2.
10 2000/11/22 19:14:08 guus
Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-145,12
+145,12
@@
int detach(void)
cp
setup_signals();
cp
setup_signals();
- if(write_pidfile())
- return -1;
-
if(do_detach)
daemon(0, 0);
if(do_detach)
daemon(0, 0);
+ if(write_pidfile())
+ return -1;
+
openlog(identname, LOG_CONS | LOG_PID, LOG_DAEMON);
if(debug_lvl > DEBUG_NOTHING)
openlog(identname, LOG_CONS | LOG_PID, LOG_DAEMON);
if(debug_lvl > DEBUG_NOTHING)