]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - string.c
Merge commit 'meins/master'
[paraslash.git] / string.c
index d23e43c1eecb1d34e4eaefda77423da076ab412a..bdc113d3586c63059311968275f6134f5a9037b9 100644 (file)
--- a/string.c
+++ b/string.c
@@ -328,27 +328,6 @@ __must_check unsigned split_args(char *args, char *** const argv_ptr, const char
        return n;
 }
 
-/**
- * Ensure that file descriptors 0, 1, and 2 are valid.
- *
- * Common approach that opens /dev/null until it gets a file descriptor greater
- * than two.
- *
- * \sa okir's Black Hats Manual.
- */
-void valid_fd_012(void)
-{
-       while (1) {
-               int fd = open("/dev/null", O_RDWR);
-               if (fd < 0)
-                       exit(EXIT_FAILURE);
-               if (fd > 2) {
-                       close(fd);
-                       break;
-               }
-       }
-}
-
 /**
  * Get the own hostname.
  *