OSSP CVS Repository

ossp - Difference in ossp-pkg/lmtp2nntp/lmtp2nntp_daemon.c versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/lmtp2nntp/lmtp2nntp_daemon.c 1.2 -> 1.3

--- lmtp2nntp_daemon.c   2003/01/30 19:42:13     1.2
+++ lmtp2nntp_daemon.c   2003/01/30 19:45:20     1.3
@@ -49,8 +49,8 @@
     int fd;
     int rc;
 
-    /* 
-     * if we are started from init, 
+    /*
+     * if we are started from init,
      * no need to become daemon.
      */
     if (getppid() == 1)
@@ -73,7 +73,7 @@
      * fork so the parent can exit, this returns control to the command line
      * or shell invoking your program. This step is required so that the new
      * process is guaranteed not to be a process group leader (The next step,
-     * setsid, would fail if you're a process group leader). 
+     * setsid, would fail if you're a process group leader).
      */
     rc = fork();
     switch (rc) {
@@ -86,7 +86,7 @@
      * setsid to become a process group and session group leader. Since a
      * controlling terminal is associated with a session, and this new session
      * has not yet acquired a controlling terminal our process now has no
-     * controlling terminal, which is a Good Thing for daemons. 
+     * controlling terminal, which is a Good Thing for daemons.
      */
 #ifdef HAVE_SETSID
     if (setsid() == -1)
@@ -97,7 +97,7 @@
 #ifndef _PATH_TTY
 #define _PATH_TTY "/dev/tty"
 #endif
-    if ((fd = open(_PATH_TTY, O_RDWR)) == -1) 
+    if ((fd = open(_PATH_TTY, O_RDWR)) == -1)
         return -1;
     ioctl(fd, TIOCNOTTY, NULL);
     close(fd);
@@ -106,7 +106,7 @@
     /*
      * fork again so the parent, (the session group leader), can exit. This
      * means that we, as a non-session group leader, can never regain a
-     * controlling terminal. 
+     * controlling terminal.
      */
     rc = fork();
     switch (rc) {
@@ -120,20 +120,20 @@
      * use. Failure to do this could make it so that an administrator couldn't
      * unmount a filesystem, because it was our current directory.
      * [Equivalently, we could change to any directory containing files
-     * important to the daemon's operation.] 
+     * important to the daemon's operation.]
      */
     chdir("/");
 
     /*
      * give us complete control over the permissions of anything we write. We
-     * don't know what umask we may have inherited.  [This step is optional] 
+     * don't know what umask we may have inherited.  [This step is optional]
      */
     umask(0);
 
     /*
      * close fds 0, 1, and 2. This releases the standard in, out, and error we
      * inherited from our parent process. We have no way of knowing where
-     * these fds might have been redirected to. 
+     * these fds might have been redirected to.
      */
     if ((fd = open("/dev/null", O_RDWR, 0)) != -1) {
         dup2(fd, STDIN_FILENO);

CVSTrac 2.0.1