r.m.oudkerk schrieb: > Now that socket.fromfd() and socket._dup() is available on Windows in > 2.6 and 3.0 (after a patch from me) some of the code could be removed. > I would also like to see recvfd() and sendfd() get added to the socket > module -- these functions allow the transfer of file descriptors > between processes over a Unix domain socket.
I can neither find recvfd in my man pages nor in my header files in /usr/include on Linux (Ubuntu 8.04 i686). I assume recvfd and sendfd aren't syscalls but the proposed names for the functions. > (1) a Connection type (plus PipeConnection on windows) > (2) a "process shared" lock/semaphore type > (3) Win32 functions/constants to allow use of named pipes > (4) A few other Win32 functions/constants > (5) A wrapper making PyObject_AsWriteBuffer() available from Python > > I suppose (4) and perhaps (3) could sensibly be added/merged with > _subprocess.c. (5) could also be moved somewhere else. Why do you want to put the named pipes into the _subprocess module? IMHO the socket module is more appropriate for communication channels like name pipes. > (Off-topic but I think that the way that subprocess.Popen.__del__() > keeps the object alive if the process has not finished is a little > distasteful. The __del__() method and the _cleanup() function are > completely unecessary on Windows since Windows does not have zombie > processes. On Unix __del__() could simply save the pid to the _active > list and _cleanup() could be rewritten to use os.waitpid().) Interesting idea. The approach could safe us some trouble. I'm always +1 when it comes to removing ugly hacks. Christian _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com