Monks, I have a perl Tk program that displays a network on a Canvas. Upon clicking a certain place on the canvas, I fork a process and immediately exec() a new process.
if (!($pid = fork)) { # child process -- returns with 0 as pid exec('/root/Phase2/OperatorView4/recurse5.pl', $btnMpIp); } else { # we are in parent process; Store the process ID of the chil +d in the hash $hash_ref->{$btnMpIp}->{processid} = $pid; } }
The exec'd program is also a Perl/Tk program. It basically queries certain nodes an displays a graph and is a bit time consuming. It is/was working great up until I decided to display a progressbar to indicate progress. Now I intermittently get the following error
Xlib: unexpected async reply (sequence 0x8d)! X Error of failed request: BadIDChoice (invalid resource ID chosen for this connection) Major opcode of failed request: 53 (X_CreatePixmap) Resource id in failed request: 0x480000d Serial number of failed request: 145 Current serial number in output stream: 143
What would be the reason for this and why does it happen intermittently? Thank you much in advance

In reply to Perk/Tk fork()predicament by dlal66

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.