- Signals and Windows:
Not OS supported. Very limited emulation by Perl. Not reliable.
- Signals and threads:
Signals are, at best, on platforms that support them natively, a very crude form of IPC.
They are not a useful mechanism of Inter-Thread Communications.
From the Linux man pages:
The signal disposition is a per-process attribute: in a multithreaded
application, the disposition of a particular signal is the same for all
threads.
A child created via fork(2) inherits a copy of its parent's signal
dispositions. During an execve(2), the dispositions of handled signals are
reset to the default; the dispositions of ignored signals are left unchanged.
A signal may be generated (and thus pending) for a process as a whole (e.g.,
when sent using kill(2)) or for a specific thread (e.g., certain signals, such
as SIGSEGV and SIGFPE, generated as a consequence of executing a specific
machine-language instruction are thread directed, as are signals targeted at a
specific thread using pthread_kill(3)). A process-directed signal may be
delivered to any one of the threads that does not currently have the signal
blocked. If more than one of the threads has the signal unblocked, then the
kernel chooses an arbitrary thread to which to deliver the signal.
- Signals and blocking-IO:
Since 5.8, Perl only delivers signals after the currently executing opcode completes (SAFE_SIGNALS). If the currently executing opcode is a blocking IO operation that may never complete -- eg. reading a line from a pipe -- the signal may never be delivered
- Sending every known signal:
Utter desperation. :)
For a solution to your problem that works, see Re^3: trying to get timeout to work (easier with threads).
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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.
RIP Neil Armstrong
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|