Date: Mon, 24 May 2004 09:51:49 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Arne Dirks <ad@bnc.net> Cc: freebsd-questions@freebsd.org Subject: Re: sigset_t Message-ID: <20040524145148.GD72502@dan.emsphone.com> In-Reply-To: <web-657870@bnc.net> References: <web-657870@bnc.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (May 24), Arne Dirks said: > I have just coded something on my Mac with signal funcionalities. On > my machine (OS X 10.3) it compiles without problems, but on a FreeBSD > 5.2.1 machine I get an error. The compiler says: > > main.c:10: error: invalid initializer > *** Error code 1 > > > My Code was: > > 10: sigset_t sig = SIGALRM; sigset_t is a signal set, which I believe is a bitmap internally. SIGALRM is just a number. You must use the functions listed in the sigsetops manpage to manipulate signal sets. The correct code for your case would be something like: sigset_t sig; sigemptyset(&sig); sigaddset(&sig, SIGALRM); -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040524145148.GD72502>