fcntl/ioctl and O_NONBLOCK

Ralf Hildebrandt hildeb at www.stahl.bau.tu-bs.de
Fri Nov 26 09:19:11 EST 1999


Hi!

I'm trying the following unsing Python-1.5.2 on Solaris 2.6: 

... snip ...
program = popen2.Popen3(commandline, self.true, buffersize)
# start program with 64k Buffer

stdin  = program.tochild
stdout = program.fromchild

rv = fcntl.ioctl(stdout.fileno(), FCNTL.O_NONBLOCK, 1)
# rv = fcntl.ioctl(stdout.fileno(), FCNTL.O_NDELAY, 1)
... snap ...

But no matter what I do - I keep getting
IOError: [Errno 22] Invalid argument

What I want to do: I want to use select() to see if there's data to be
read from stdin or stdout and read it ALL (thus I need stdin/stdout to
be non blocking!)

Any ideas?




More information about the Python-list mailing list