]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Use os._exit after forking
authorAngus Lees <gus@inodes.org>
Fri, 15 May 2015 07:54:18 +0000 (17:54 +1000)
committerAngus Lees <gus@inodes.org>
Tue, 26 May 2015 00:11:52 +0000 (10:11 +1000)
commitf0decf6a4061be18999c87eab6ae152d9f75f99f
treea9b5272802d3a0b9f5c3580b0507ea379a8c8b70
parent54e91b01cf7b311f48a40c14c7f9c1d8c0926ab4
Use os._exit after forking

As the docs point out(*), _exit should be used after a fork() to avoid
both processes flushing filehandles, calling destructors with side
effects, etc.  This change does just that.

(*) https://docs.python.org/2/library/os.html#os._exit

Change-Id: I68da6283c44ab8857baf217ac1443bd17988257d
neutron/agent/linux/daemon.py
neutron/tests/unit/agent/linux/test_daemon.py