Piping an application which uses fork()



Hi all,

i've opened a pipe and added a Gtk2::Helper watcher.
Now the command i call is a programm written in C and uses fork(), when i try to grab its output i obtain 
only the output that comes out before the fork() call, while all the other out come in the consolle from 
which i run my program. Where's my error?

Thanks a lot :)

P.S. i open the pipe with open my $pipe, '-|', 'command', qw(s w i t c h e s); and add th Gtk2::Helper 
watcher with my $watcher = Gtk2::Helper->add_watch($pipe, 'in', sub {...});

-- 
"Solo due cose sono infinite: l'universo e la stupidita' umana."

Albert Einstein
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Telefonare all'estero risparmiando fino all'80%? Con Email.it Phone Card puoi, clicca e scopri tutti i 
vantaggi
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2683&d=12-3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]