in reply to problems on signal handling, Glib mainloop, and named pipe
Named Pipes says:
When you open a fifo, the program will block until there’s something on the other end.
If you move the open after setting up your signal handlers, then your signal will be caught and reported. The problem is your program stops in the open. The signal is received before your signal handler is set up and the default action of SIGUSR1 is to terminate your program.
If you have some other process open the fifo for writing, then the open in your perl program will return and your program will carry on. Try running it as is, running another process to open the fifo for write, then send your program a signal.
But, it would probably be best to set up the signal handlers earlier.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: problems on signal handling, Glib mainloop, and named pipe
by llancet (Friar) on Oct 14, 2010 at 08:10 UTC | |
by ig (Vicar) on Oct 14, 2010 at 08:17 UTC |