http://qs321.pair.com?node_id=124968


in reply to Re: Re: Re: Re: Re: Re: Re:(wog) Win32::Gui + Threading?
in thread Win32::Gui + Threading?

I think prehaps your behavior is caused by buffering of the input, then. Is the problem fixed when you close TO_P (after sending the exit command) or when you send exit\n instead of exit? (Which may be enough to convince perl that it should return from the <FROM_P> which I think it's not doing. But it'd be nice if you'd to have the forked process to print some stuff (to a file or STDERR) so you can tell where its hanging...)

Replies are listed 'Best First'.
Re^9: (wog) Win32::Gui + Threading?
by Flame (Deacon) on Nov 13, 2001 at 05:50 UTC
    Oh... yep, that did it...

    Could I use something similar to that first pipe() command to get data back from the 2'nd process?

    Something like:
    pipe(FROM_C, TO_P) or die "pipe: $!"; select(((select(TO_P), $| = 1))[0]);


    ???


    -----BEGIN GEEK CODE BLOCK-----
    Version: 3.12
    GIT d- s:++ a--- C++++ UL P+++>++++ L+ E- W++>+++ N !o K- w+ O---- M-- V--
    PS PE Y- PGP t++(+++) 5(+++)++++ X R+@ tv+ b+++ DI+ D- G e->+++ h! r-- y-
    ------END GEEK CODE BLOCK------
    Translate

    "Weird things happen, get used to it."

    Flame ~ Lead Programmer: GMS