it's even worse:
salva@tokio:/tmp$ perl bug.pl running "ls -al" (pid = 25963) ... closing ... cannot close: No child processes -1 at bug.pl line 17.
But when I launch the script with strace to see what's happening at the OS level...
salva@tokio:/tmp$ strace -f -o /tmp/out perl bug.pl running "ls -al" (pid = 25984) ... closing ... total 358 drwxrwxrwt 11 root root 600 2007-10-16 15:28 . drwxr-xr-x 24 root root 736 2007-07-17 11:58 .. -rw-r--r-- 1 salva salva 0 2007-10-16 13:54 bar -rw-r--r-- 1 salva salva 373 2007-10-16 15:28 bug.pl -rw-r--r-- 1 salva salva 26 2007-10-16 13:52 foo drwx------ 3 salva salva 72 2007-10-16 09:21 gconfd-salva ...
It works!!!

BTW, I am running Debian unstable and perl 5.8.8.


In reply to Re: odd interaction of Net::SSH::Expect and open by salva
in thread odd interaction of Net::SSH::Expect and open by danmcb

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.