Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have written a nice little service that is supposed run all the time as a background process handling requests from other programs, converting them to SOAP requests and dispatching them to a SOAP server via https. I am using the excellent SOAP::Lite toolkit and have hit a problem I don't really understand. When SOAP::Lite encounters a fatal problem it often calls die. Coming from the world of C and C++ I expect library functions I call to return a value or throw an exception, not to abort the entire program. This is especially true in my case as I can't have SOAP problems dropping my service. Currently I have hacked around it by dispatching my requests in forked processes and then watching for a SIG CHILD to let me know the process exited, but this is cludgy and memory intensive. Is there a way to catch the die signal and continue with the program?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Keeping perl alive after a module calls die.
by Fletch (Bishop) on Feb 27, 2004 at 19:29 UTC | |
|
Re: Keeping perl alive after a module calls die.
by kvale (Monsignor) on Feb 27, 2004 at 19:27 UTC | |
|
Re: Keeping perl alive after a module calls die. (making die() work like warn())
by gmpassos (Priest) on Feb 27, 2004 at 21:13 UTC | |
|
Re: Keeping perl alive after a module calls die.
by Jenda (Abbot) on Feb 27, 2004 at 21:01 UTC | |
|
Re: Keeping perl alive after a module calls die.
by imcsk8 (Pilgrim) on Feb 28, 2004 at 00:19 UTC | |
|
Re: Keeping perl alive after a module calls die.
by Anonymous Monk on Jun 03, 2004 at 21:19 UTC |