Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: proper semi-portable use of signal()? Message-ID: <15605@smoke.brl.mil> Date: 27 Mar 91 22:04:42 GMT References: <3223@charon.cwi.nl> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 13 In article <3223@charon.cwi.nl> guido@cwi.nl (Guido van Rossum) writes: >I don't see what's wrong. I noticed that the declaration for signal() >in looks as follows: > extern void (*signal(int, void (*) (int, ...)))(int, ...); The header is wrong (i.e. not part of a conforming implementation). The signal handler function does NOT have a variable argument list, but always receives precisely one argument of type int. The ,... is a bogus attempt to accommodate 4.2BSD-style signal handers. If some recent modification has been made to POSIX.1 that requires this, it is WRONG and in general incompatible with the C standard. (This issue was carefully discussed at both X3J11 and P1003 levels before the original standards were adopted.)