hello guys !
A question. I have a perl script (a shell for our product), and I have a situation that I need from one running copy of the script to kill another copy of the shell that runs by another user, BUT I need also to send the shell to be killed, a message (so he'll no what happened). sending SIGKILL from the murderer to the victim (using perl
kill) will easly solve me the problem of killing but no message will be sent to the user, since I have a already a signal handler for SIGINT that does something else.
I tried using SIGPIPE, that did the trick (I wrote a signal handler for it), but sometimes in a random manner the signal handler is preformed twice and it seems to be connected to the SIGPIPE i send.
Anyone has a suggetion why this happens, or can offer me a better solution?
Hotshot
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.