mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
Merge pull request #262 from teg/udev-dup-fds-2
udevd: daemon - connect /dev/null to std{in,out,err} in debug mode
This commit is contained in:
commit
79b04ad7d4
@ -43,6 +43,7 @@
|
|||||||
#include "sd-daemon.h"
|
#include "sd-daemon.h"
|
||||||
#include "sd-event.h"
|
#include "sd-event.h"
|
||||||
|
|
||||||
|
#include "terminal-util.h"
|
||||||
#include "signal-util.h"
|
#include "signal-util.h"
|
||||||
#include "event-util.h"
|
#include "event-util.h"
|
||||||
#include "netlink-util.h"
|
#include "netlink-util.h"
|
||||||
@ -1687,6 +1688,10 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
log_info("starting version " VERSION);
|
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();
|
pid = fork();
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user