git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
daemon: Tolerate EINTR in fork_and_wait_for_startup().
[sliver-openvswitch.git]
/
python
/
ovs
/
daemon.py
diff --git
a/python/ovs/daemon.py
b/python/ovs/daemon.py
index
4e54e69
..
4df2371
100644
(file)
--- a/
python/ovs/daemon.py
+++ b/
python/ovs/daemon.py
@@
-213,10
+213,15
@@
def _fork_and_wait_for_startup():
# Running in parent process.
os.close(wfd)
ovs.fatal_signal.fork()
# Running in parent process.
os.close(wfd)
ovs.fatal_signal.fork()
- try:
- s = os.read(rfd, 1)
- except OSError, e:
- s = ""
+ while True:
+ try:
+ s = os.read(rfd, 1)
+ error = 0
+ except OSError, e:
+ s = ""
+ error = e.errno
+ if error != errno.EINTR:
+ break
if len(s) != 1:
retval, status = _waitpid(pid, 0)
if (retval == pid and
if len(s) != 1:
retval, status = _waitpid(pid, 0)
if (retval == pid and