@@ -53,6 +53,7 @@ _monitor = False
# File descriptor used by daemonize_start() and daemonize_complete().
_daemonize_fd = None
+
RESTART_EXIT_CODE = 5
I
@@ -125,6 +126,7 @@ def _make_pidfile():
# Create a temporary pidfile.
tmpfile = "%s.tmp%d" % (_pidfile, pid)
ovs.fatal_signal.add_file_to_unlink(tmpfile)
+
try:
# This is global to keep Python from garbage-collecting and
# therefore closing our file after this function exits. That would
@@ -180,7 +182,8 @@ def _make_pidfile():
if not _overwrite_pidfile:
error = ovs.fatal_signal.unlink_file_now(tmpfile)
if error:
- _fatal("%s: unlink failed (%s)" % (tmpfile, os.strerror(error)))
+ _fatal("%s: unlink failed (%s)"
+ % (tmpfile, os.strerror(error)))
global _pidfile_dev
global _pidfile_ino
@@ -250,7 +253,7 @@ def _fork_and_wait_for_startup():
os.close(rfd)
else:
- # Running in parent process.
+ # Running in child process.
os.close(rfd)
ovs.timeval.postfork()