You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across the Error if I am not comment the "print" after "os.waitpid" when using the code from you github.
I search solution from the internet, it tell me that maybe caused by lock's problem.
So I comment that code and it runs normally.
code
(webserver3h.py from your github, I just add some function about handle some encoding for python3)
defgrim_reaper(signum, frame):
whileTrue:
try:
pid, status=os.waitpid(
-1, # Wait for any child processos.WNOHANG# Do not block and return EWOULDBLOCK error
)
print(
'Child {pid} terminated with status {status}\n'.format(pid=pid, status=status)
)
exceptOSError:
return
Error
httpd.serve_forever()
File"webserver3.py", line72, inserve_foreverpid=os.fork()
File"webserver3.py", line22, ingrim_reaper'Child {pid} terminated with status {status}\n'.format(pid=pid, status=status)
File"webserver3.py", line22, ingrim_reaper'Child {pid} terminated with status {status}\n'.format(pid=pid, status=status)
RuntimeError: reentrantcallinside<_io.BufferedWritername='<stdout>'>
The text was updated successfully, but these errors were encountered:
I came across the Error if I am not comment the "print" after "os.waitpid" when using the code from you github.
I search solution from the internet, it tell me that maybe caused by lock's problem.
So I comment that code and it runs normally.
code
(webserver3h.py from your github, I just add some function about handle some encoding for python3)
Error
The text was updated successfully, but these errors were encountered: