Browse code

- fixed logging to syslog on solaris (on solaris openlog does not reopen the logs fd even if it's closed [daemonize], closelog must be called before, of course this is not documented anywhere).

Andrei Pelinescu-Onciul authored on 09/05/2003 16:21:14
Showing 1 changed files
... ...
@@ -35,6 +35,7 @@
35 35
  *  2003-04-08  init_mallocs split into init_{pkg,shm}_mallocs and 
36 36
  *               init_shm_mallocs called after cmd. line parsing (andrei)
37 37
  *  2003-04-15  added tcp_disable support (andrei)
38
+ *  2003-05-09  closelog() before openlog to force opening a new fd (needed on solaris) (andrei)
38 39
  *
39 40
  */
40 41
 
... ...
@@ -488,6 +489,7 @@ int daemonize(char*  name)
488 489
 	};
489 490
 	
490 491
 	/* close any open file descriptors */
492
+	closelog();
491 493
 	for (r=3;r<MAX_FD; r++){
492 494
 			close(r);
493 495
 	}