Article View: comp.unix.programmer
Article #3465sigaction.sa_handler = SIG_IGN (SunOS 5.4, g++ 2.7.2) give ANSI C++ warning
From: Dave
Date: Mon, 22 Apr 1996 00:00
Date: Mon, 22 Apr 1996 00:00
35 lines
1562 bytes
1562 bytes
Hi,
I get the following warning:
process.cc:192: warning: ANSI C++ prohibits conversion from `(int)' to `(...)'
Here is the relevant part of my source:
{
struct sigaction act;
act.sa_handler = SIG_IGN;
act.sa_flags = 0;
sigemptyset(&act.sa_mask);
if (sigaction(SIGTTOU, &act, NULL) != 0) PANIC;
if (sigaction(SIGTTIN, &act, NULL) != 0) PANIC;
if (sigaction(SIGTSTP, &act, NULL) != 0) PANIC;
}
The line tha gives the warning is the "act.sa_handler = SIG_IGN" line. I don't
know why I'm getting this warning. The books I have say this is okay (Rago:
UNIX SysV Net. Prog.), the man page says this is okay as well. The sa_handler
field can be either:
a void (*handler)() or SIG_IGN or SIG_DFL
What gives? I'm using SunOS 5.4 and g++ 2.7.2.
I'd appreciate being CC'ed as well. TIA.
Dave.
--
i'm on a huge wispy rhino fart
Technical Details
Message-ID:
<KXAEC.96Apr22111544@badger.wmin.ac.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,ddc07951e1acc37a,start X-Google-Attributes: gidfc89c,public X-Google-Thread: 10ba33,ddc07951e1acc37a,start X-Google-Attributes: gid10ba33,public X-Google-Thread: 11035d,ddc07951e1acc37a,start X-Google-Attributes: gid11035d,public From: kxaec@wmin.ac.uk (Dave) Subject: sigaction.sa_handler = SIG_IGN (SunOS 5.4, g++ 2.7.2) give ANSI C++ warning Date: 1996/04/22 Message-ID: <KXAEC.96Apr22111544@badger.wmin.ac.uk> X-Deja-AN: 150771812 distribution: world organization: LOGICA UK Ltd. followup-to: comp.unix.programmer newsgroups: comp.unix.programmer,comp.unix.solaris,gnu.g++.help