Message ID | 1538295197-23704-24-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aGhkZ3Tj"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42NJlW1mjYz9s4V for <incoming@patchwork.ozlabs.org>; Sun, 30 Sep 2018 18:40:39 +1000 (AEST) Received: from localhost ([::1]:54353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1g6XHI-0002OT-PH for incoming@patchwork.ozlabs.org; Sun, 30 Sep 2018 04:40:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1g6WrJ-0002Ih-93 for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:13:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1g6WrG-0000MU-3g for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:13:45 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:37099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1g6WrF-0000Jn-So for qemu-devel@nongnu.org; Sun, 30 Sep 2018 04:13:42 -0400 Received: by mail-wm1-x332.google.com with SMTP id 185-v6so248900wmt.2 for <qemu-devel@nongnu.org>; Sun, 30 Sep 2018 01:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tiO1ufhNBOZ8MbQ7kBz2WX7h72pOJZPZdCUBjI+UcJo=; b=aGhkZ3Tjx8UWxZvCzf4a6COS5CfRxcV7pgj8gc75h8tjJGAPgdqiL96jwWfELCsf2u ObinWCL3gXoxKUP7c+FpkWbTAiSfuy5SwLu5D26MCAOcVGGw+9y1ACXHLek0ywLZfBVr OHLiSF/V8yYwc8zCkOZwUoqTUjhek57fRSw4kvNpYP19RDwMknYd/TGZsNX4XNY/8Le7 5px7BJY7ikWuvdssVbFq2lahCvxp4ekGkHZsurnyBQR4ZlKRiqSGart5M6TRUlUnhD3F UzQBmeQRL+JnNGToeE6hxaXIQoU44SD3TQfKFRKv0mdmj6u0qdn6hATXjzhUzqJcavth Cytw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=tiO1ufhNBOZ8MbQ7kBz2WX7h72pOJZPZdCUBjI+UcJo=; b=b8zaxeqLBlfbbbIHMXPud8E5JeLWGsRw08FcVK78ewsmD2iNRh1tZV2SYgOyJ+t5Gq QfOQNY7jTr0lRhW1wpzpkus+TSCcpQmgKaYTLBX1Oc5kUIHF18KPFmu4VidMfHul/4+W gHBajNiVzeSVPHHteSzlAqlaLgVfH04/DrC4Dmgv/NBTONQQTSedEPFsxNwv4U13WdJ4 jkuTmH+Y2Xwv60DEkWR/YFPurUGbCjj5cknqgf43HsJIZ4hOatGOM6mO0Wb+hZYOPR02 KGLbCCDwTakEAkeAlNZEJj0QT1VoeVbCh52W0dCpaLE2swWAVbJw8NgyuymVBfvq0hRE XtrA== X-Gm-Message-State: ABuFfojmND4sNBuwrClxzaVgIsKfRytGyjRjLOXnrv4le/Y1Smj/kdBV 8Z8VOE0/94o0Fh/on9s8FUf3roE/ X-Google-Smtp-Source: ACcGV62zh7R2vdME5M8ZalWRGNM9MOhASwdTO0hnqvVG2gLTilLQj49e2c/8tnG8poGuY3nc6TArwQ== X-Received: by 2002:a1c:280a:: with SMTP id o10-v6mr6210858wmo.33.1538295220583; Sun, 30 Sep 2018 01:13:40 -0700 (PDT) Received: from 640k.lan (94-36-187-248.adsl-ull.clienti.tiscali.it. [94.36.187.248]) by smtp.gmail.com with ESMTPSA id u76-v6sm11369194wmd.10.2018.09.30.01.13.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Sep 2018 01:13:39 -0700 (PDT) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Date: Sun, 30 Sep 2018 10:12:21 +0200 Message-Id: <1538295197-23704-24-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> References: <1538295197-23704-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 Subject: [Qemu-devel] [PULL 23/79] Delete PID file on exit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/79] virtio: Return true from virtio_queue_empty if broken
|
expand
|
diff --git a/vl.c b/vl.c index fa6db17..f2964d9 100644 --- a/vl.c +++ b/vl.c @@ -2560,6 +2560,16 @@ static void qemu_run_exit_notifiers(void) notifier_list_notify(&exit_notifiers, NULL); } +static const char *pid_file; +static Notifier qemu_unlink_pidfile_notifier; + +static void qemu_unlink_pidfile(Notifier *n, void *data) +{ + if (pid_file) { + unlink(pid_file); + } +} + bool machine_init_done; void qemu_add_machine_init_done_notifier(Notifier *notify) @@ -2884,7 +2894,6 @@ int main(int argc, char **argv, char **envp) const char *vga_model = NULL; const char *qtest_chrdev = NULL; const char *qtest_log = NULL; - const char *pid_file = NULL; const char *incoming = NULL; bool userconfig = true; bool nographic = false; @@ -3911,6 +3920,9 @@ int main(int argc, char **argv, char **envp) exit(1); } + qemu_unlink_pidfile_notifier.notify = qemu_unlink_pidfile; + qemu_add_exit_notifier(&qemu_unlink_pidfile_notifier); + if (qemu_init_main_loop(&main_loop_err)) { error_report_err(main_loop_err); exit(1);