]> diplodocus.org Git - nmh/blobdiff - uip/rcvtty.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / rcvtty.c
index 181c422b83d73f6ad20d04d12a608f5f86d39d17..101aa5ab9f422be7d19b9f86e4371dec3632c041 100644 (file)
@@ -18,7 +18,7 @@
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/utils.h>
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/utils.h>
-#include "../sbr/m_mktemp.h"
+#include "sbr/m_mktemp.h"
 #include <fcntl.h>
 
 #ifdef HAVE_GETUTXENT
 #include <fcntl.h>
 
 #ifdef HAVE_GETUTXENT
@@ -58,11 +58,6 @@ static int width = -1;
 static char *form = NULL;
 static char *format = NULL;
 
 static char *form = NULL;
 static char *format = NULL;
 
-/*
- * external prototypes
- */
-char *getusername(void);
-
 /*
  * static prototypes
  */
 /*
  * static prototypes
  */
@@ -237,7 +232,7 @@ message_fd (char **vec)
     if (dup2 (fd, 1) == NOTOK || dup2 (fd, 2) == NOTOK)
        _exit (-1);
     closefds (3);
     if (dup2 (fd, 1) == NOTOK || dup2 (fd, 2) == NOTOK)
        _exit (-1);
     closefds (3);
-    setpgid ((pid_t) 0, getpid ());    /* put in own process group */
+    setpgid(0, getpid());      /* put in own process group */
     if (execvp (vec[0], vec) == NOTOK) {
         _exit (-1);
     }
     if (execvp (vec[0], vec) == NOTOK) {
         _exit (-1);
     }