You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3584 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Dr Leonid Timochouk
Version: 3.08.3
OS: Linux (manual OCaml build from sources)
Submission from: 82-41-94-35.cable.ubr02.dund.blueyonder.co.uk (82.41.94.35)
In the Sys module, the integer values of the signals (Sys.sigabrt, Sys.sigalrm,
...) are not the actual POSIX values; they are translated into the POSIX values
by the function caml_convert_signal_number (located in asmrun/signals.c or
byterun/signals.c).
In the Unix module, according to the documentation, if Unix.wait or Unix.waitpid
returns process_status which is (WSIGNALLED of int) or (WSTOPPED of int), the
int value is the number of the corresp signal. However, this number appears to
be a real POSIX signal number, i.e. it is not compatible with constants declared
in Sys. Thus, it is impossible to check correctly, at the OCaml level, which
signal caused process termination.
Proposed solution: implement a function which is the inverse of
caml_convert_signal_number, and apply it in Unix.wait and Unix.waitpid before
returning a WSIGNALLED or WSTOPPED value. (I will provide a patch in a few
days).
The text was updated successfully, but these errors were encountered:
Original bug ID: 3584
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Dr Leonid Timochouk
Version: 3.08.3
OS: Linux (manual OCaml build from sources)
Submission from: 82-41-94-35.cable.ubr02.dund.blueyonder.co.uk (82.41.94.35)
In the Sys module, the integer values of the signals (Sys.sigabrt, Sys.sigalrm,
...) are not the actual POSIX values; they are translated into the POSIX values
by the function caml_convert_signal_number (located in asmrun/signals.c or
byterun/signals.c).
In the Unix module, according to the documentation, if Unix.wait or Unix.waitpid
returns process_status which is (WSIGNALLED of int) or (WSTOPPED of int), the
int value is the number of the corresp signal. However, this number appears to
be a real POSIX signal number, i.e. it is not compatible with constants declared
in Sys. Thus, it is impossible to check correctly, at the OCaml level, which
signal caused process termination.
Proposed solution: implement a function which is the inverse of
caml_convert_signal_number, and apply it in Unix.wait and Unix.waitpid before
returning a WSIGNALLED or WSTOPPED value. (I will provide a patch in a few
days).
The text was updated successfully, but these errors were encountered: