Re: Strange socket problem

2005-06-15 Thread huy
Hi Jeff, Thanks for your help. Although I haven't confirmed this, I think you just hit my nail on the head. I thought os.system was like a totally separate process though, i.e nothing is shared. not the usual fork() call within the program. Regards, Huy Jeff Epler wrote: > When using os.syst

Re: Strange socket problem

2005-06-15 Thread nm674674
Gurus, I am still doing my baby steps in the wonderful world of python (so far, so good). However, I am quite familiar with sockets. There is a socket option called SO_REUSEADDR that your server should call to fix this problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange socket problem

2005-06-15 Thread Magnus Lycka
huy wrote: > Hi, > > I'm using cherrypy to provide a user interface for users to start a > linux server program eg. os.system("nohup myserver.py &"). The problem > is that if I stop cherrypy server and restart, I get the "Address > Already In Use" problem until I stop myserver.py. Can someone s

Re: Strange socket problem

2005-06-15 Thread Jeff Epler
When using os.system(), files that are open in the parent are available in the child, as you can see here in Linux' listing of the files open by the child program: [EMAIL PROTECTED] jepler]$ python -c 'f = open("/tmp/test", "w"); print f.fileno(); import os; os.system("ls -l /proc/self/fd")' 3 to

Strange socket problem

2005-06-15 Thread huy
Hi, I'm using cherrypy to provide a user interface for users to start a linux server program eg. os.system("nohup myserver.py &"). The problem is that if I stop cherrypy server and restart, I get the "Address Already In Use" problem until I stop myserver.py. Can someone shed some light on why