/[projects]/smsdaemon/daemon.cpp
ViewVC logotype

Diff of /smsdaemon/daemon.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 26 by torben, Mon Jun 9 18:15:53 2008 UTC revision 114 by torben, Sun Nov 2 20:14:20 2008 UTC
# Line 2  Line 2 
2    
3  #include <signal.h>  #include <signal.h>
4  #include <fcntl.h>  #include <fcntl.h>
5    #include <stdlib.h>
6    #include <cstring>
7    
8  #include "daemon.h"  #include "daemon.h"
9  #include "common.h"  #include "common.h"
# Line 77  void daemonize() Line 79  void daemonize()
79          /* first instance continues */          /* first instance continues */
80          sprintf(str, "%d\n", getpid() ); /* record pid to lockfile */          sprintf(str, "%d\n", getpid() ); /* record pid to lockfile */
81          write(lfp, str, strlen(str) );          write(lfp, str, strlen(str) );
82          signal(SIGCHLD, SIG_IGN); /* ignore child */          //signal(SIGCHLD, SIG_IGN); /* ignore child */
83          signal(SIGTSTP, SIG_IGN); /* ignore tty signals */          signal(SIGTSTP, SIG_IGN); /* ignore tty signals */
84          signal(SIGTTOU, SIG_IGN);          signal(SIGTTOU, SIG_IGN);
85          signal(SIGTTIN, SIG_IGN);          signal(SIGTTIN, SIG_IGN);

Legend:
Removed from v.26  
changed lines
  Added in v.114

  ViewVC Help
Powered by ViewVC 1.1.20