It is possible for the executable to stop itself or so it seems.

I take it your are talking about the command run by system(). What do you know about the state of the process when it is stopped, what causes it to stop and what its natural course is if you don't signal it? Can you say what the command is?

The problem is when the subprocess stops like this the parent also stops.

If you mean that the child process of your main perl process waits until the system call returns, this is the way system works. If you mean the parent perl process stops, what do you know about the process when it is stopped? Is it some particular function that does not complete?

I tried to capture the stop in both the parent and child but no luck.

Do you mean that the signal was received by your process but your signal handler was not called? Or was no stop signal received?


In reply to Re: Stopped child hangs parent by ig
in thread Stopped child hangs parent by jafoba

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.