On Thu, 19 Jul 2007 21:07:55 -0500, alf <[EMAIL PROTECTED]> wrote:
>
>Hi,
>
>I need a help with explaining following behavior. Although it is not
>python issue per say, python helped me to write sample programs and
>originally I encountered the issue using python software. So let's
>assume we have two following programs:
>
> [snip - file descriptors inherited by child process]

You can avoid this, if you like.  Set FD_CLOEXEC on the socket after you
open it, before you call os.system:

  old = fcntl.fcntl(s.fileno(), fcntl.F_GETFD)
  fcntl.fcntl(s.fileno(), fcntl.F_SETFD, old | fcntl.FD_CLOEXEC)

Jean-Paul
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to