Hi, Thank you very much for your message. I'm using perl 5.005_03 on HP-UX 10.20 and 5.8.0 on Tru64 v5. I think that i've not explained the exact problem.
The connection sequence would be as shown:

At this point, I close the client that calls the telnet. If I start remsh w/o the -n option, then the spawned child remsh process becomes defunct (most probably b'cos the parent remsh process does not do a wait()). If I start remsh with the -n option, then there does not appear to be any signals processed (additionally remsh inherently ignores TERM, INT and QUIT).
So, at this point, I have my perl script still running along with the remsh processes. The script will exit along with the remsh processes only when there is some data returned from remsh and SIGPIPE is received.
Is there any other way I can check for the closure of the socket from my perl script (given the fact that I dont have a file handle on the socket) ? Also, any other way I can check for the closure of STDOUT ? I cant write arbitrary data out to STDOUT as the script writes to another set of processes that parse the data and expect the data to be in a certain format and those processes cannot be modified easily.
Thanks again!

In reply to Re: Re: inetd spawned perl problem by vasu
in thread inetd spawned perl problem by vasu

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.