Re: [ovs-dev] [PATCH 2/2] daemon: Call make_pidfile after the creation of the worker.

2013-04-29 Thread Ben Pfaff
On Mon, Apr 29, 2013 at 11:27:27AM -0700, Gurucharan Shetty wrote: > On Mon, Apr 29, 2013 at 10:04 AM, Ben Pfaff wrote: > > I think that it is best to try to create the pidfile as early as we can. > > If there is a conflicting pidfile, then it is best to recognize this > > early on and avoid doing

Re: [ovs-dev] [PATCH 2/2] daemon: Call make_pidfile after the creation of the worker.

2013-04-29 Thread Gurucharan Shetty
On Mon, Apr 29, 2013 at 10:04 AM, Ben Pfaff wrote: > Thank you for figuring this out! It is a subtle problem. More > commentary below. > > On Mon, Apr 29, 2013 at 08:16:36AM -0700, Gurucharan Shetty wrote: > > Currently we are creating the worker after creation of the pidfile. > > This means tw

Re: [ovs-dev] [PATCH 2/2] daemon: Call make_pidfile after the creation of the worker.

2013-04-29 Thread Ben Pfaff
Thank you for figuring this out! It is a subtle problem. More commentary below. On Mon, Apr 29, 2013 at 08:16:36AM -0700, Gurucharan Shetty wrote: > Currently we are creating the worker after creation of the pidfile. > This means two things for ovs-vswitchd. One, the pidfile's file descriptor >

[ovs-dev] [PATCH 2/2] daemon: Call make_pidfile after the creation of the worker.

2013-04-29 Thread Gurucharan Shetty
Currently we are creating the worker after creation of the pidfile. This means two things for ovs-vswitchd. One, the pidfile's file descriptor is open in both main process and the worker process and closing of the file descriptor in either of the process means we will loose the lock on the pidfile.