diff options
author | Sverker Eriksson <[email protected]> | 2017-11-23 15:35:16 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-11-23 15:35:16 +0100 |
commit | 851d82dae27e89275b2a107f98b2fa7bd9c08a1e (patch) | |
tree | e807705e605b1bf2c7b4fef3b10484357f39bd06 | |
parent | 9ff9e4cbbeb26b5d420e4552dedbda1820660ed7 (diff) | |
download | otp-851d82dae27e89275b2a107f98b2fa7bd9c08a1e.tar.gz otp-851d82dae27e89275b2a107f98b2fa7bd9c08a1e.tar.bz2 otp-851d82dae27e89275b2a107f98b2fa7bd9c08a1e.zip |
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.
-rw-r--r-- | erts/etc/unix/run_erl.c | 7 |
1 files changed, 2 insertions, 5 deletions
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. |