From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B01CE3858C54; Fri, 14 Apr 2023 15:02:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B01CE3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681484578; bh=kfSLr+tU25TkG3qQ2THPPpPDAYnTPs2dtkBkZ7X0GnQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L2ZbtAz2HbvVG2OAzWXPWfRrix/KHISF7jl057RywVJir9Bi96/5PSXZZf7uW8xOL BQQtFXH0WvUHuM4VLiXFw+FaZCEfeN2tpFuoh75ueNfCaMpsoCtrpqamiFfzSPmsrE hq3cXiEA8xkPRyZWk693Jr5n9FmTrBa64m9DQ/HA= From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/30349] Support returning a pidfd from posix_spawn() Date: Fri, 14 Apr 2023 15:02:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30349 --- Comment #6 from Adhemerval Zanella --- (In reply to Adhemerval Zanella from comment #2) > I think it should be a reasonable interface for Linux. I think the most > straightforward interface would be: >=20=20 > int posix_spawn_pidfd_ex (int *restrict pidfd, const char *restrict path, > const posix_spawn_file_actions_t *restrict > file_actions, > const posix_spawnattr_t *restrict attrp, > char *const argv[restrict_arr], > char *const envp[restrict_arr]) Another option, which would not require adding a new symbol, would to add a= new posix_spawnattr_t attribute (POSIX_SPAWN_PIDFD), which would make posix_spa= wn return the pidfd on the 'pid' argument. It should be safe at least on Linu= x, where pid_t and int are interchangeable. --=20 You are receiving this mail because: You are on the CC list for the bug.=