diff options
author | Fredrik Gustafsson <[email protected]> | 2013-07-29 16:48:53 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-07-29 16:48:53 +0200 |
commit | a5fc79292b9b018cd39d104a8cd2e79de141e3ad (patch) | |
tree | f8af1499f7cada2e4c1ee2196c8a058ec2c4d703 /erts/etc/unix | |
parent | 0481ecafa24dc60c6bca8afdda038dc2239c991d (diff) | |
parent | 5e0c73fecc31c72f86663bec55819f093151a039 (diff) | |
download | otp-a5fc79292b9b018cd39d104a8cd2e79de141e3ad.tar.gz otp-a5fc79292b9b018cd39d104a8cd2e79de141e3ad.tar.bz2 otp-a5fc79292b9b018cd39d104a8cd2e79de141e3ad.zip |
Merge branch 'weisslj/run-erl-redirect-dev-null/OTP-11215' into maint
* weisslj/run-erl-redirect-dev-null/OTP-11215:
run_erl: Redirect standard streams to /dev/null
Diffstat (limited to 'erts/etc/unix')
-rw-r--r-- | erts/etc/unix/run_erl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c index 53c779b1be..b69e31f784 100644 --- a/erts/etc/unix/run_erl.c +++ b/erts/etc/unix/run_erl.c @@ -1142,6 +1142,14 @@ static void daemon_init(void) sf_close(i); } + /* Necessary on some platforms */ + + open("/dev/null", O_RDONLY); /* Order is important! */ + open("/dev/null", O_WRONLY); + open("/dev/null", O_WRONLY); + + errno = 0; /* if set by open */ + OPEN_SYSLOG(); run_daemon = 1; } |