Ok, that explains that. Is there a recommended alternative for simple parent/child communication? I had hoped to avoid using sockets, but I'm not seeing any other alternatives... | [reply] |
As I pointed out above, the first problem with your OP code is that 'INT' is not defined anywhere, so your attempt to kill INT, $pid; is just a syntax error.
Are you looking for a win32-only solution or must it be cross platform.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
Win32 only. The two options I know of are socketpair and a file-based semaphore implementation. I'm hoping for something that is simpler than the former, but not quite so brute-force-ish as the latter.
| [reply] |
kill INT, $pid;
with this linekill 2, $pid;
I also added use strict to make sure everything else was correct, and the script now runs with no errors.
This does not, however, solve the problem. Per a previous post, kill() was not completely ported to win32. I'm looking at alternatives, but so far all I've found is socketpair. This is a bit heavier than I had hoped for.
The script is for win32 only. If you have any suggestions for alternatives, I would love to hear them. | [reply] [d/l] [select] |