D
Daud
Hi there ...
I need to know how to compile the program idba1EnableSignal.c to get
idba1EnableSignal.o.
I tried like below but I got some errors. I believe it is because it
cannot find signal.h but I just don't know how to include this when
compiling. I am not a c-programmer.
$ gcc -c idba1EnableSignal.c -ansi
idba1EnableSignal.c: In function `idba1EnableSignal':
idba1EnableSignal.c:25: error: `SIGHUP' undeclared (first use in this
function)
idba1EnableSignal.c:25: error: (Each undeclared identifier is reported
only once
idba1EnableSignal.c:25: error: for each function it appears in.)
idba1EnableSignal.c:26: error: `SIGQUIT' undeclared (first use in this
function)
idba1EnableSignal.c:27: error: `SIGKILL' undeclared (first use in this
function)
idba1EnableSignal.c
------------------------
#include <sys/signal.h>
extern void CleanUp();
void idba1EnableSignal()
{
signal(SIGINT, CleanUp);
signal(SIGHUP, CleanUp);
signal(SIGQUIT, CleanUp);
signal(SIGKILL, CleanUp);
return;
}
Thanks.
Daud
I need to know how to compile the program idba1EnableSignal.c to get
idba1EnableSignal.o.
I tried like below but I got some errors. I believe it is because it
cannot find signal.h but I just don't know how to include this when
compiling. I am not a c-programmer.
$ gcc -c idba1EnableSignal.c -ansi
idba1EnableSignal.c: In function `idba1EnableSignal':
idba1EnableSignal.c:25: error: `SIGHUP' undeclared (first use in this
function)
idba1EnableSignal.c:25: error: (Each undeclared identifier is reported
only once
idba1EnableSignal.c:25: error: for each function it appears in.)
idba1EnableSignal.c:26: error: `SIGQUIT' undeclared (first use in this
function)
idba1EnableSignal.c:27: error: `SIGKILL' undeclared (first use in this
function)
idba1EnableSignal.c
------------------------
#include <sys/signal.h>
extern void CleanUp();
void idba1EnableSignal()
{
signal(SIGINT, CleanUp);
signal(SIGHUP, CleanUp);
signal(SIGQUIT, CleanUp);
signal(SIGKILL, CleanUp);
return;
}
Thanks.
Daud