So do I understand correctly that there is no cross platform method of accomplishing this, portable to Linux?

I don't know enough about Linux to comment authoratively. I have read that traditional signals do not mix well with Perl.

In their raw form, as used prior to 5.8.0, they could interupt individual Perl opcodes part way through execution, and so leave Perl's fat datastructures in an incomplete or unstable state. Mostly okay for exceptional purposes where the code was to die anyway, but not so good for pure IPC purposes, where the code interupted needed to continue.

In their 'safe-signals' form, this problem is avoided by ensuring that the signal does not interupt the user's (perl) code until the interpreter is 'between' opcodes. This makes continuaton more reliable, but renders the immediacy of signals somewhat dented. Unlike a C program, where a single cpu-level opcode can rarely take more than a few milliseconds, a single Perl opcode can be doing a great deal (sorting a huge datastructure for example).

There are the IPC::SysV & IPC::Semaphore stuff, but from what I read these are not even that dependable on systems that claim SysV compatibility, and probably do nothing at all on many non-*nix based patforms.

Take all that with a pinch of salt as I'm really relating what I have read, not talking from experience.


Examine what is said, not who speaks.
"But you should never overestimate the ingenuity of the sceptics to come up with a counter-argument." -Myles Allen
"Think for yourself!" - Abigail        "Time is a poor substitute for thought"--theorbtwo         "Efficiency is intelligent laziness." -David Dunham
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

In reply to Re^3: how to implement interprocess communication by BrowserUk
in thread how to implement interprocess communication by redss

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.