Message101380
Following code snippet will behave differently on Linux and windows hosts.
Under linux the script can only be run once.
The second call will raise an exception, as the previous program is
already listening to pot 8089.
Under Windows however the program can be started twice.
and will print twice "serving". This surprises me
The script:
# ##########################
import socket,sys
from multiprocessing.managers import BaseManager
mngr = BaseManager(address=('127.0.0.1',8089),authkey='verysecret')
try:
srvr = mngr.get_server()
except socket.error as e:
print "probably address already in use"
sys.exit()
print "serving"
srvr.serve_forever()
Perhaps the reason for the problem might be related to
http://bugs.python.org/issue2550
I'd suggest to fix multiprocessing.managers.BaseManager such, that it behaves identially on both platforms. |
|
Date |
User |
Action |
Args |
2010-03-20 17:08:52 | news1234 | set | recipients:
+ news1234 |
2010-03-20 17:08:52 | news1234 | set | messageid: <1269104932.24.0.802901286813.issue8184@psf.upfronthosting.co.za> |
2010-03-20 17:08:51 | news1234 | link | issue8184 messages |
2010-03-20 17:08:50 | news1234 | create | |
|