chiark / gitweb /
logind: update empty and "infinity" handling for [User]TasksMax (#3835)
[elogind.git] / src / basic / fd-util.c
index 8e4cfe3fe4084fec6f7c8b5d0654329821dfcc48..3eb3324b57bc2ae53ecbca7e4baf65be3c3f50ab 100644 (file)
@@ -186,6 +186,12 @@ int fd_cloexec(int fd, bool cloexec) {
         return 0;
 }
 
+void stdio_unset_cloexec(void) {
+        fd_cloexec(STDIN_FILENO, false);
+        fd_cloexec(STDOUT_FILENO, false);
+        fd_cloexec(STDERR_FILENO, false);
+}
+
 _pure_ static bool fd_in_set(int fd, const int fdset[], unsigned n_fdset) {
         unsigned i;