[erlang-bugs] Strange thing in lib/kernel/src/group.erl
Fri May 3 10:34:40 CEST 2013
I've stumbled across a small issue in the implementation of the process
The code in group.erl spawns a server process that monitors the exit of
either the shell and the user_drv that started it. In the regular
server_loop, exits of the user_drv (Drv) are handled as follows:
When a blocking io_request is being executed, the following code is
%% 'kill' instead of R, since the shell is not always in
%% a state where it is ready to handle a termination
Besides the behaviour being inconsistent, it also means that our shell
process monitor receives the 'killed' exit reason more often than the
real exit reason, which defeats our custom error handling and logging.
Looking at the comment above the exit_shell(kill) statement, there seems
to have been a reason to put it there at some time. Looking at the code
in the io module that does those io_requests, it should not be
I'm unsure whether it is safe to remove the exit_shell(kill) statement
or whether something would terribly break. However, not receiving the
correct exit reason does give us a headache.
Dr. Stefan Zegenhagen
Garbsener Landstr. 10
Tel: +49 511 277-2734
Fax: +49 511 277-2709
*Synchronize the Ethernet*
General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.
Please consider the environment before printing this message.
More information about the erlang-bugs