From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VobIg-0000Ia-4B for qemu-devel@nongnu.org; Thu, 05 Dec 2013 10:57:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VobIX-0000tL-Ny for qemu-devel@nongnu.org; Thu, 05 Dec 2013 10:57:14 -0500 Received: from mail-ea0-x230.google.com ([2a00:1450:4013:c01::230]:52943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VobIX-0000ry-Hv for qemu-devel@nongnu.org; Thu, 05 Dec 2013 10:57:05 -0500 Received: by mail-ea0-f176.google.com with SMTP id h14so11487794eaj.35 for ; Thu, 05 Dec 2013 07:57:04 -0800 (PST) Date: Thu, 5 Dec 2013 16:57:02 +0100 From: Stefan Hajnoczi Message-ID: <20131205155702.GA16463@stefanha-thinkpad.redhat.com> References: <1385031835-4472-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1385031835-4472-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] qtest: don't leak pid files and UNIX domain sockets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , qemu-devel@nongnu.org, Andreas Faerber , Gerd Hoffmann On Thu, Nov 21, 2013 at 12:03:53PM +0100, Stefan Hajnoczi wrote: > GLib uses abort(3) to exit failed test cases. As a result, the pid file and > UNIX domain sockets for a running test are leaked upon failure. > > Since abort(3) does not call atexit(3) handler functions, we could set up a > SIGABRT handler that performs cleanup. But there are other conditions where > processes die, like SIGSEGV or SIGBUS. > > Let's unlink pid files and UNIX domain sockets as soon as the QEMU process has > initialized and connections have been made. This eliminates the possibility of > leaking these files. > > Note that the actual QEMU process is orphaned when a test case fails. This > series does not fix that problem. > > Stefan Hajnoczi (2): > qtest: unlink QEMU pid file after startup > qtest: unlink UNIX domain sockets after connecting > > tests/libqtest.c | 45 +++++++++++++++++++++++---------------------- > 1 file changed, 23 insertions(+), 22 deletions(-) Ping