projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a54941f
)
udevd: daemon - connect /dev/null to std{in,out,err} in debug mode
author
Tom Gundersen
<teg@jklm.no>
Wed, 17 Jun 2015 15:43:11 +0000
(17:43 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Wed, 17 Jun 2015 16:07:20 +0000
(18:07 +0200)
This is essentially a revert of 5c67cf2 and fixes issue #190.
src/udev/udevd.c
patch
|
blob
|
history
diff --git
a/src/udev/udevd.c
b/src/udev/udevd.c
index
5ce1160
..
11f1f63
100644
(file)
--- a/
src/udev/udevd.c
+++ b/
src/udev/udevd.c
@@
-43,6
+43,7
@@
#include "sd-daemon.h"
#include "sd-event.h"
+#include "terminal-util.h"
#include "signal-util.h"
#include "event-util.h"
#include "netlink-util.h"
@@
-1687,6
+1688,10
@@
int main(int argc, char *argv[]) {
log_info("starting version " VERSION);
+ /* connect /dev/null to stdin, stdout, stderr */
+ if (log_get_max_level() < LOG_DEBUG)
+ (void) make_null_stdio();
+
pid = fork();
switch (pid) {
case 0: