[hackers] [sbase] Audit setsid(1) || FRIGN

From: <git_AT_suckless.org>
Date: Tue, 3 Mar 2015 14:32:25 +0100 (CET)

commit 0795e99512a18e2e5fecc4e70a2330b0cc592bdd
Author: FRIGN <dev_AT_frign.de>
Date: Mon Mar 2 00:20:35 2015 +0100

    Audit setsid(1)
    
    Nothing special, just a small style-fix.

diff --git a/README b/README
index fddc9ac..95afd82 100644
--- a/README
+++ b/README
_AT_@ -60,7 +60,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
 =* rmdir yes none
 # sed
     seq non-posix none
-=* setsid non-posix none
+=*| setsid non-posix none
 =*| sha1sum non-posix none
 =*| sha256sum non-posix none
 =*| sha512sum non-posix none
diff --git a/setsid.c b/setsid.c
index e97d1a2..b666e33 100644
--- a/setsid.c
+++ b/setsid.c
_AT_@ -20,7 +20,7 @@ main(int argc, char *argv[])
                 usage();
         } ARGEND;
 
- if (argc < 1)
+ if (!argc)
                 usage();
 
         if (getpgrp() == getpid()) {
_AT_@ -38,5 +38,6 @@ main(int argc, char *argv[])
         execvp(argv[0], argv);
         savederrno = errno;
         weprintf("execvp %s:", argv[0]);
+
         return (savederrno == ENOENT) ? 127 : 126;
 }
Received on Tue Mar 03 2015 - 14:32:25 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 03 2015 - 14:36:15 CET