comparison lib/fatal-signal.h @ 40238:3ac749aa0041

fatal-signal: Pass the signal number to the action. * lib/fatal-signal.h (at_fatal_signal): Change the signature. * lib/fatal-signal.c (action_t): Take the signal number as parameter. (fatal_signal_handler): Pass the signal number to the action. * lib/clean-temp.c (cleanup_action): Renamed from cleanup. Take the signal number as parameter. (create_temp_dir): Update. * lib/wait-process.c (cleanup_slaves_action): New function. (register_slave_subprocess): Update at_fatal_signal invocation. * NEWS: Mention the change.
author Bruno Haible <bruno@clisp.org>
date Sat, 16 Mar 2019 22:56:21 +0100
parents b1386ce84ff5
children
comparison
equal deleted inserted replaced
40237:b1386ce84ff5 40238:3ac749aa0041
49 and leave them blocked upon return. 49 and leave them blocked upon return.
50 50
51 The cleanup function is executed asynchronously. It is unspecified 51 The cleanup function is executed asynchronously. It is unspecified
52 whether during its execution the catchable fatal signals are blocked 52 whether during its execution the catchable fatal signals are blocked
53 or not. */ 53 or not. */
54 extern void at_fatal_signal (void (*function) (void)); 54 extern void at_fatal_signal (void (*function) (int sig));
55 55
56 56
57 /* Sometimes it is necessary to block the usually fatal signals while the 57 /* Sometimes it is necessary to block the usually fatal signals while the
58 data structures being accessed by the cleanup action are being built or 58 data structures being accessed by the cleanup action are being built or
59 reorganized. This is the case, for example, when a temporary file or 59 reorganized. This is the case, for example, when a temporary file or