Problem with asyncore and Python2.0
Panu A Kalliokoski
pkalliok at cc.helsinki.fi
Thu May 31 06:47:24 EDT 2001
Craig Findlay <craigf at ilid.com.au> wrote:
> However, If I then log off the console or the SSH session, the next
> time a client tries to connect, the process dies silently.
Sounds like some stream (stdin? stderr?) is not disconnected from the tty.
Try closing fd's 0, 1 and 2, then forking twice, and then opening your log
file for fd's 1 and 2. Then, if you want to be pedantic, test whether you
can open /dev/tty, and if so, send it an ioctl of TIOCNOTTY. Simple, isn't
it? Praise Un*x!
Panu
More information about the Python-list
mailing list