------- Comment #6 from dfranke at gcc dot gnu dot org 2007-05-29 18:13 ------- I am currently looking at the implementation of signal, so adding this may be not too much effort. Some questions/remarks:
> The third argument "flag" is an integer that plays the role of SIG_DFL > in the C library version of signal(). [...] for example, it says that > when flag=-1, control is passed to the user's signal handler function > "ctrlco" when signal number "signum" is encountered. If flag=0, the > user's signal handler function is ignored and the default action is > taken instead. (1) There is no 3-argument version of signal(2) in glibc-2.[56]?! (2) You are aware of the differnt ways to invoke the SIGNAL function? You can _either_ set a handler function or use handler=1 (SIG_IGN) or handler=0 (SIG_DFL): INTEGER, PARAMETER :: SIG_DFL = 0, SIG_IGN = 1 status = signal(number, handler) ! install a signal handler status = signal(number, SIG_DFL) ! restore default handler status = signal(number, SIG_IGN) ! ignore signal This won't compile your code out of the box, but gives the functionality you are asking for (as I understand it). Introducing a third argument seems to be redundant. FX, you confirmed this enhancement: is do-as-the-others-do really good enough a reason to implement this? -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfranke at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29240