alf <[EMAIL PROTECTED]> writes:

> still would like to find out why it is happening (now FD_CLOEXEC
> narrowed may yahooing/googling searches). While realize that file
> descriptors are shared by forked processes it is still weird why the
> port moves to the child process once parent gets killed. what it the
> parent got multiple subprocesses.

Netstat probably shows only one of the processes that hold to the
port, possibly the one with the lowest PID (the parent).

> Plus it is kind of unintuitive os.system does not protect from such
> behavoir which is for me more an equivalent of like issuing a ne
> wcommand/ starting a process from the shell.

It is considered a feature that fork/exec'ed programs inherit file
descriptors -- that's how stdin and stdout get inherited all the time.
It doesn't occur often with network connections because shells rarely
have reason to open them.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to