unknown
2014-02-04 17:45:54 UTC
Magnus ! ping.
Any interest in trying to get this two year old patch into OTP 17?
The feature of propagating exit status seems reasonable and useful.
/Sverker, Erlang/OTP
Any interest in trying to get this two year old patch into OTP 17?
The feature of propagating exit status seems reasonable and useful.
/Sverker, Erlang/OTP
git fetch git://github.com/legoscia/otp.git run_erl_exit_status_simple
I got two objections on the the other version using select timeout.
1. You don't check if it actually was a timeout from select() before
doing "want_to_exit = 1".
2. No test that reproduces the more complicated case.
/Sverker
I got two objections on the the other version using select timeout.
1. You don't check if it actually was a timeout from select() before
doing "want_to_exit = 1".
2. No test that reproduces the more complicated case.
/Sverker
Good catch, exit() is indeed not safe inside a signal handler, as it
flushes stdio buffers etc.
git fetch git://github.com/legoscia/otp.git run_erl_exit_status
https://github.com/legoscia/otp/commit/run_erl_exit_status
But since I still haven't been able to reproduce the case that the
alarm is supposed to handle, I also committed a simpler change
git fetch git://github.com/legoscia/otp.git run_erl_exit_status_simple
https://github.com/legoscia/otp/commit/run_erl_exit_status_simple
That change still gives the correct result with all invocations I've
tried. It might be a safer bet...
Regards,
Magnus
----- Original Message -----
flushes stdio buffers etc.
git fetch git://github.com/legoscia/otp.git run_erl_exit_status
https://github.com/legoscia/otp/commit/run_erl_exit_status
But since I still haven't been able to reproduce the case that the
alarm is supposed to handle, I also committed a simpler change
git fetch git://github.com/legoscia/otp.git run_erl_exit_status_simple
https://github.com/legoscia/otp/commit/run_erl_exit_status_simple
That change still gives the correct result with all invocations I've
tried. It might be a safer bet...
Regards,
Magnus
----- Original Message -----
Is it really right to call exit() from a signal handler like that.
Wouldn't it be safer to use the select() timeout instead of alarm().
Sorry for the late review, code stop is tomorrow for R15B.
/Sverker, Erlang/OTP
Wouldn't it be safer to use the select() timeout instead of alarm().
Sorry for the late review, code stop is tomorrow for R15B.
/Sverker, Erlang/OTP
Hi all,
Here is a patch that makes run_erl return the exit status of its
child
process. (Probably only useful when using run_erl without -daemon,
just for convenient logging.)
I added a signal handler for SIGALRM, since that appeared to be one
of
the ways run_erl exits, but I haven't been able to trigger that in
my
testing (it always exits because it can't read from the child's
pty).
I would appreciate informed opinions about whether that part is
necessary and correct.
git fetch git://github.com/legoscia/otp.git run_erl_exit_status
https://github.com/legoscia/otp/commit/29364cf9a6e1fcfd032503ff9888cffc4327b867
Regards,
Magnus
_______________________________________________
erlang-patches mailing list
erlang-patches
http://erlang.org/mailman/listinfo/erlang-patches
Here is a patch that makes run_erl return the exit status of its
child
process. (Probably only useful when using run_erl without -daemon,
just for convenient logging.)
I added a signal handler for SIGALRM, since that appeared to be one
of
the ways run_erl exits, but I haven't been able to trigger that in
my
testing (it always exits because it can't read from the child's
pty).
I would appreciate informed opinions about whether that part is
necessary and correct.
git fetch git://github.com/legoscia/otp.git run_erl_exit_status
https://github.com/legoscia/otp/commit/29364cf9a6e1fcfd032503ff9888cffc4327b867
Regards,
Magnus
_______________________________________________
erlang-patches mailing list
erlang-patches
http://erlang.org/mailman/listinfo/erlang-patches