[pygtk] how to close the X connection file descriptor?
Fred L. Drake, Jr.
fdrake@acm.org
Wed, 15 Nov 2000 11:19:29 -0500 (EST)
James Henstridge writes:
> You probably want to set the FD_CLOEXEC fcntl on all file descriptors >= 3
> (as 0,1,2 are stdin,out and err). There is a sysconf call to get the
> maximum file descriptor number, but I don't know if this is available from
> python. So except for getting the maximum file descriptor number, the
> rest can be done with the fcntl and FCNTL modules.
Check the documentation for os.sysconf(), available as of Python
1.6.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Digital Creations