Sandro Bonazzola has posted comments on this change.

Change subject: packaging: engine-service: do not fail if setsid fails
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File packaging/fedora/engine-service.py.in
Line 573:     os.chdir("/")
Line 574: 
Line 575:     # setsid fails if already group leader
Line 576:     try:
Line 577:         os.setsid()
Yes, I know that. But if I've understood correctly how setsid works, in the 
child process setsid should never fail.
Line 578:     except OSError:
Line 579:         pass
Line 580: 
Line 581:     # Then open the console log and redirect standard output and 
errors to it:


Line 582:     engineConsoleFd = os.open(engineConsoleLogFile, os.O_CREAT | 
os.O_WRONLY | os.O_APPEND, 0660)
Line 583:     os.dup2(engineConsoleFd, 1)
Line 584:     os.dup2(engineConsoleFd, 2)
Line 585:     os.close(engineConsoleFd)
Line 586: 
If you're fixing this in order to be a proper daemon, I think you'll need a 
second fork here to ensure that the daemon is re-parented onto init.
Line 587:     # Prepare a clean environment:
Line 588:     engineEnv = {
Line 589:         "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin",
Line 590:         "LANG": "en_US.UTF-8",


--
To view, visit http://gerrit.ovirt.org/13416
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7092aa2d009875fcf45c560a6d480901016d5273
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Alex Lourie <alou...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to