stop and wait

40 views
Skip to first unread message

David Byron

unread,
Oct 17, 2013, 8:19:12 PM10/17/13
to bluep...@googlegroups.com
I have the urge for bluepill stop to not only request to stop a process, but also to wait until the process is actually gone.  Using stop_signals instead of stop_command looks tempting, but the waiting for processes to exit happens in separate threads, so the main stop command returns while the process may still be running.  The reason I want this is so that on reboot I can make sure the relevant processes clean up in the right order.  So, if bluepill:quit would wait for the threads to finish before returning, that'd work for me as well.

I can add a wait command to the sudo kill that's currently in my stop_command, but it feels like this is a normal enough thing to do to have it in bluepill itself.  From looking at the stop_process method in process.rb, it doesn't feel like it'd be too hard to do.  I'm curious what other people think, and if there's a preferred way to ask bluepill to use this blocking stop approach.  I may be able to carve out enough time to create a pull request with the changes.

Thanks.

-DB

Reply all
Reply to author
Forward
0 new messages