chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
unit: suppress incorrect deserialization errors
[elogind.git]
/
src
/
util.c
diff --git
a/src/util.c
b/src/util.c
index d653d6b549beac73ff3884994d2d6334993db2a5..9a82c71dcb249b1e268f8959385fecbc05782f59 100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-2605,6
+2605,15
@@
int make_stdio(int fd) {
return 0;
}
+int make_null_stdio(void) {
+ int null_fd;
+
+ if ((null_fd = open("/dev/null", O_RDWR|O_NOCTTY)) < 0)
+ return -errno;
+
+ return make_stdio(null_fd);
+}
+
bool is_clean_exit(int code, int status) {
if (code == CLD_EXITED)