🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2614

Re: proper semi-portable use of signal()?

#2614
From: Doug Gwyn
Date: Wed, 27 Mar 1991 22:04
13 lines
1135 bytes
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 <signal.h> 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.)
Technical Details
Message-ID: <15605@smoke.brl.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!cmcl2!adm!smoke!gwyn
References: <3223@charon.cwi.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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