socket question:socket.error:(4,'Interrupted system call')

张少驰 zhangsc at neusoft.com
Mon Dec 17 06:37:13 CET 2001


I have compiled a program to deal with Zombie process which caused by child process,it follows:
...
ipsock=socket.socket(socket.AF_INET,10,8)
while 1:
  recvpack=ipsock.recv(1024)
  ...
  def sig_chld(signum, frame):
  os.waitpid(-1,os.WNOHANG);
  signal.signal(signal.SIGCHLD,sig_chld);
  ret=os.fork()
  if ret==0: #child process
     .....

It raise a error:
Traceback (most recent call last):
  File "d88.py", line 26, in ?
    recvpack=ipsock.recv(1024)
socket.error: (4, 'Interrupted system call')

Why is error? How to correct it? Any ideas will be appreciated.
            Thanks!
               Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20011217/7902b2db/attachment.html>


More information about the Python-list mailing list