I am wondering if it is better if we could just import the shared library and 
call the detach function 
(https://github.com/openvswitch/ovs/blob/master/lib/daemon-windows.c#L342) 
instead of duplicating the effort.

I wonder if the same could be applied un the *unix side as well.

Thanks,
Alin.

> -----Mesaj original-----
> De la: dev [mailto:dev-boun...@openvswitch.org] În numele Paul Boca
> Trimis: Wednesday, July 6, 2016 3:38 PM
> Către: dev@openvswitch.org
> Subiect: [ovs-dev] [PATCH V6 12/17] python tests: Ported Python daemon to
> Windows
> 
> Used subprocess.Popen instead os.fork (not implemented on windows) and
> repaced of os.pipe with Windows pipes.
> 
> To be able to identify the child process I added an extra parameter to
> daemon process '--pipe-handle', this parameter also contains the parent
> Windows pipe handle, used by the child to signal the start.
> 
> The PID file is created directly on Windows, without using a temporary file
> because the symbolic link doesn't inheriths the file lock set on temporary 
> file.
> 
> Signed-off-by: Paul-Daniel Boca <pb...@cloudbasesolutions.com>
> ---
> V2: Fix lockf on Linux, small error on os.link and missing pipe_handle
> parameter.
> V3: Import modules at the start of the code
> V4: Close file before trying to delete it in signal hooks.
>     On Windows the PID file cannot be deleted while it's handle
>     is opened for write.
> V5: No changes
> V6: Explicitly close the vlog file in detached daemon. On Windows, even if the
>     daemon is detached, the primary daemon is still holding a handle to the 
> log
>     file, therefore the log cannot be moved/deleted even is the vlog/close
> command
>     is sent to the detached daemon.
> ---
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to