l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2002 Mar 14 05:14

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] help with signals and C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] help with signals and C

On Wed, 2002-03-13 at 10:52, Peter Jay Salzman wrote:

> looking through the man pages, i found that signal returns a type
> sighandler_t:
>    sighandler_t signal(int signum, sighandler_t handler);

Actually, no it doesn't.  If you look more carefully, the manpage only
uses sighandler_t (an arbitrary type name) to explain the actual
prototype of signal():

  void (*signal(int signum, void (*sighandler)(int)))(int)

Trying to use a sighandler_t or, especially, __sighandler_t, is
ill-advised....  (and completely unlikely to change code behavior).

As to why the code is failing....  as far as ANSI C is concerned, an
implementation doesn't have to signal at all, regardless of what kind of
floating point exception occurs.  I don't know enough about the
specifics of Linux on Intel to tell you whether some circumstances might
actually cause the signal to be generated, but I believe someone here
mentioned trying integer zero-divide (SIGFPE doesn't have to be floating
point, really).


vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!