Opened 23 years ago

Closed 23 years ago

Last modified 23 years ago

#95 closed defect (invalid)

Signals not working right on LFS 2.4.4 system

Reported by: dknie@… Owned by: lfs-book@…
Priority: highest Milestone:
Component: Book Version: 2.4.4
Severity: critical Keywords:
Cc:

Description

The SIGTERM signal is not being sent correctly or might not even work on my install. A friend used the following code to test SIGTERM's existence... #include <unistd.h> #include <stdio.h> #include <signal.h>

static void sig_term(int signo);

int main(int argc, char argv) {

if(signal(SIGTERM,sig_term)==SIG_ERR)

fprintf(stderr,"Can't catch SIGTERM\n");

printf("Kill me with a SIGTERM. Go ahead I dare you! PID = %d\n",

(int)getpid());

pause(); return 0;

}

static void sig_term(int signo) {

if(signal(SIGTERM,sig_term)==SIG_ERR)

fprintf(stderr,"Can't catch SIGTERM\n");

printf("SIGTERM? Is that all you got?\n"); pause();

}

Everytime this app gets a SIGTERM is should respond with SIGTERM? Is that all you got? but, for some reason, it only displays that line with the first SIGTERM. I am not sure if this is an error with glibc, the kernel, or configuration. The system was built right off of the LFS 2.4.4 book. Kernel is 2.4.4, and glibc is 2.1.3

Change History (1)

comment:1 by markh@…, 23 years ago

Resolution: invalid
Status: newclosed

Someone posted a fixed program which sorted this for the reporter. I'm therefore closing the bug. If the issue continues, the reporter can re-open it.

Note: See TracTickets for help on using tickets.