From nobody Thu Nov 6 17:32:36 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488261208862197.28051846642086; Mon, 27 Feb 2017 21:53:28 -0800 (PST) Received: from localhost ([::1]:58757 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciaj1-0000mU-8e for importer@patchew.org; Tue, 28 Feb 2017 00:53:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciXsw-0003dR-ND for qemu-devel@nongnu.org; Mon, 27 Feb 2017 21:51:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciXst-00041L-Mp for qemu-devel@nongnu.org; Mon, 27 Feb 2017 21:51:30 -0500 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:34499) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciXst-000412-GZ for qemu-devel@nongnu.org; Mon, 27 Feb 2017 21:51:27 -0500 Received: by mail-wr0-x244.google.com with SMTP id u48so2520450wrc.1 for ; Mon, 27 Feb 2017 18:51:25 -0800 (PST) Received: from cid.gitrdone.lan (D97AC014.cm-3-3d.dynamic.ziggo.nl. [217.122.192.20]) by smtp.gmail.com with ESMTPSA id e73sm16576422wmi.32.2017.02.27.18.51.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Feb 2017 18:51:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hentenaar.com; s=google; h=from:to:cc:subject:date:message-id; bh=YLulYnNMq6yn5I8eJufDNtkVvor+c5DvEOHvttHZeyo=; b=lbuzzlabr/46E3Y7GR1TNhXyjq9bLVYfcx7uXuILVplujsJ2GSwhILdQhwLTHJ1tu1 2YS/Vwsear2z0L6vR1ZIRp0NjFU1uHOwiDvGOaaeayGEbKhMwmkakDGH3YtiNC2Oz9rv MPxvVDl16DgojY2QULbuGghgDPS1gY8StSa5k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YLulYnNMq6yn5I8eJufDNtkVvor+c5DvEOHvttHZeyo=; b=BX/NOFzVxEx6RMZ+3kGvESSpKMruomszXQ4a+CY1r/aff9pL+Llo5Zh/rWKji5/Nm6 ffLLXoNgQtjh9Cfr/8miT0QWkoNKXKSAEMYgK3t/ouMLfJvTYB8Rz141t9km9xbZHrO6 gfUk75fUZDm7mZmhd0ehVpHQ/yqfOY7LzCxdGMvo54M4Scf9Mt6ITyn9y0GjXXv+9SSZ SCB/ljZn999jOtxntTYnZLGId39hoeuzLOHdPc+iFLtmvyIEgYgs8gy1tHvNYAC304b/ 3wCXtAXebmaQiUMqMf2SkiQrDgiIA4+1OHV3w28NmZkwWDpWSa5Cw962zyVceSpxc4uJ 2FoQ== X-Gm-Message-State: AMke39kwg0XvTwZLuzQWPt9I7ekTcfjKsVAMJE5wqQFtQUUTlJLY/i7u2IIvJd2WFj35og== X-Received: by 10.223.129.74 with SMTP id 68mr16042247wrm.183.1488250284789; Mon, 27 Feb 2017 18:51:24 -0800 (PST) From: Tim Hentenaar To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 03:51:57 +0100 Message-Id: <20170228025157.3499-1-tim@hentenaar.com> X-Mailer: git-send-email 2.10.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 X-Mailman-Approved-At: Tue, 28 Feb 2017 00:51:51 -0500 Subject: [Qemu-devel] [PATCH] linux-user: Fix fork() and vfork() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Hentenaar , Riku Voipio Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" A check was introduced in 5ea2fc84da1bffce749c9d0848f5336def2818bb which causes fork() and vfork() to fail if TARGET_SIGCHLD !=3D SIGCHLD. Signed-off-by: Tim Hentenaar --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f569f82..ac4106a 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7680,7 +7680,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long = arg1, break; #ifdef TARGET_NR_fork case TARGET_NR_fork: - ret =3D get_errno(do_fork(cpu_env, SIGCHLD, 0, 0, 0, 0)); + ret =3D get_errno(do_fork(cpu_env, TARGET_SIGCHLD, 0, 0, 0, 0)); break; #endif #ifdef TARGET_NR_waitpid @@ -10490,7 +10490,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_lon= g arg1, #endif #ifdef TARGET_NR_vfork case TARGET_NR_vfork: - ret =3D get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | SIGCHL= D, + ret =3D get_errno(do_fork(cpu_env, CLONE_VFORK | CLONE_VM | TARGET= _SIGCHLD, 0, 0, 0, 0)); break; #endif --=20 2.10.2