From 9ff9e4cbbeb26b5d420e4552dedbda1820660ed7 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 17 Nov 2017 16:27:40 +0100 Subject: erts: Clarify RUN_ERL_LOG_GENERATIONS --- erts/doc/src/run_erl.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'erts') diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml index a9b6a7e2c6..e4c1b943c4 100644 --- a/erts/doc/src/run_erl.xml +++ b/erts/doc/src/run_erl.xml @@ -181,6 +181,12 @@

Controls the number of log files written before older files are reused. Defaults to 5, minimum is 2, maximum is 1000.

+

Note that, as a way to indicate the newest file, run_erl will + delete the oldest log file to maintain a "hole" in the file + sequences. For example, if log files #1, #2, #4 and #5 exists, that + means #2 is the latest and #4 is the oldest. You will therefore at most + get one less log file than the value set by + RUN_ERL_LOG_GENERATIONS.

RUN_ERL_LOG_MAXSIZE -- cgit v1.2.3 From 851d82dae27e89275b2a107f98b2fa7bd9c08a1e Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 23 Nov 2017 15:35:16 +0100 Subject: run_erl: Cleanup buggy retry of close The retry loop wasn't working anyway as it tested fd<0 instead of res. So, there is no real semantic change here. --- erts/etc/unix/run_erl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'erts') diff --git a/erts/etc/unix/run_erl.c b/erts/etc/unix/run_erl.c index f05c729eeb..81a0036c99 100644 --- a/erts/etc/unix/run_erl.c +++ b/erts/etc/unix/run_erl.c @@ -1343,11 +1343,8 @@ static int sf_open(const char *path, int type, mode_t mode) { return fd; } static int sf_close(int fd) { - int res = 0; - - do { res = close(fd); } while(fd < 0 && errno == EINTR); - - return res; + /* "close() should not be retried after an EINTR" */ + return close(fd); } /* Extract any control sequences that are ment only for run_erl * and should not be forwarded to the pty. -- cgit v1.2.3