From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: Reply #2: [TOOLS] To make use of the patches Date: Sat, 23 Jul 2011 12:33:06 +0400 Message-ID: <4E2A8742.8090800@parallels.com> References: <4E204466.8010204@parallels.com> <4E204554.6040901@parallels.com> <20110723004045.GC21563@count0.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110723004045.GC21563-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Matt Helsley Cc: Glauber Costa , Cyrill Gorcunov , Linux Containers , Nathan Lynch , Tejun Heo , Serge Hallyn , Daniel Lezcano List-Id: containers.vger.kernel.org On 07/23/2011 04:40 AM, Matt Helsley wrote: > On Fri, Jul 15, 2011 at 05:49:08PM +0400, Pavel Emelyanov wrote: > > > >> static void kill_imgfiles(int pid) >> { >> /* FIXME */ >> } >> >> static int stop_task(int pid) >> { >> return kill(pid, SIGSTOP); >> } > > Shouldn't you wait() on the task too? Otherwise I think you'll race > with it. Alternately, you could introduce a wait() phase after the loop > calls stop_task() below... Well, as discussed - I will switch to the freezer cgroup instead of this signalling.