[triangle-zpug] Weird platform dependent python error: forking and pseudoterminals

Chris Rossi chris at spacelabstudio.com
Wed Jul 19 16:26:06 CEST 2006


T. Bryan wrote:
> On Friday 14 July 2006 11:22, Chris Rossi wrote:
> 
>>Hi, I'm observing some weird behavior and have written the following
>>test program to demonstrate:
> 
> 
> No idea what's going on.  Sorry.  :)
> 
> 
>>( pid, fd ) = pty.fork()
> 
> 
> Is there a reason you're doing it this way?
> 
> 
>>Anybody have any idea what's going on here?  Is there a better way to
>>fork and capture the output of the child process?
> 
> 
> Well, do you *have* to pty.fork() for some reason?  Why not use the subprocess 
> module (or one of the older ones it was meant to replace)?
> 
Well, because I didn't want to call an external program, I just wanted 
to fork the currently running process.   If I don't figure this out I 
will probably refactor to call another python program externally and use 
a pipe, but it won't be as convenient as doing this, which seems like it 
ought to work.

Thanks!
chris

PS Out of town for several days, or else I would have written back sooner.
-- 
http://spacelabstudio.com                              +1 919 403 5502
Occasionally an email never arrives in my inbox.  If it seems like
I'm ignoring you, resend or try calling me.



More information about the triangle-zpug mailing list