daemon-windows: Implement --detach option for Windows.
authorGurucharan Shetty <gshetty@nicira.com>
Tue, 15 Apr 2014 17:14:05 +0000 (10:14 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 22 Apr 2014 22:18:09 +0000 (15:18 -0700)
commit4ec4776c69d44acb3379e663ca700fd7ab3aecb2
tree434166bd58ece1a6066e4b06b9c1dae66ddc3449
parent69b17834a47300d13e86c680f03800d107ab9b1e
daemon-windows: Implement --detach option for Windows.

When "--detach" is specified, a daemon will create a new
process with the same command line options as the parent.
Additionally, an undocumented command line option "--pipe-handle"
is passed to child. Once the child is ready to handle external
commands, it communicates with the parent that it is ready using
the pipe handle. The parent exits. This lets us run the daemons
in background. This will also help the unit tests because currently
most of the unit tests pass the '--detach' option to the daemons.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/daemon-windows.c
lib/daemon.h