From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11266 Path: news.gmane.org!.POSTED!not-for-mail From: Zack Weinberg Newsgroups: gmane.comp.lib.glibc.alpha,gmane.linux.lib.musl.general Subject: Re: [musl] [PATCH] add support for POSIX_SPAWN_SETSID Date: Sat, 22 Apr 2017 19:49:04 -0400 Message-ID: References: <20170331050243.4485-1-quae@daurnimator.com> <20170331160156.GL17319@brightrain.aerifal.cx> <20170422231933.GK17319@brightrain.aerifal.cx> <20170422234729.GL17319@brightrain.aerifal.cx> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1492904954 21986 195.159.176.226 (22 Apr 2017 23:49:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2017 23:49:14 +0000 (UTC) Cc: musl@lists.openwall.com, GNU C Library To: Rich Felker Original-X-From: libc-alpha-return-78879-glibc-alpha=m.gmane.org@sourceware.org Sun Apr 23 01:49:08 2017 Return-path: Envelope-to: glibc-alpha@m.gmane.org Original-Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d24m3-0005WF-HG for glibc-alpha@m.gmane.org; Sun, 23 Apr 2017 01:49:07 +0200 DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=EBle lU08jwpuxYuGsm09oH5zWPMuGAWaVuXabosYDRRR6kQ56ZhVpRnQw3Le9VDykDDD kNAJ0Cj6Tx2CMwNjBTpiFrJkpwovc6fLVuoLihXrtP1doI9nsWq/mTQlqk5khBHh 1jufkGRR+lj7n2IhSd3Jt8HoxQUuEHGC+RaYHNc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; s=default; bh=ampfalxiM5 cjSjUb/4uU8fg+JNE=; b=ABsEltJma5qvJ9WExfyfu7kK3zzyARsTwDbN39j9uG byYyR1wtWDtC0StzKsQbSq6OXct7wR86aM8+nQBR/ERt2dq80prwJ8qYKSrCBiKN uZkQNz4TAPBfcgdFpPTiqjDEil4fZTqDpII+f3rJMvXMv3XGYPbxBGR7zFYJ9yH1 E= Original-Received: (qmail 54169 invoked by alias); 22 Apr 2017 23:49:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: libc-alpha-owner@sourceware.org Original-Received: (qmail 54150 invoked by uid 89); 22 Apr 2017 23:49:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: mailbackend.panix.com X-Gm-Message-State: AN3rC/7fqAOWlpV9g/gS1FBit4WeTYPcCDvNycRJn5wCjBq2mxk+QrnZ iBJeqPjapR+mwfaNe7a5kqZeZw/cBQ== X-Received: by 10.107.133.35 with SMTP id h35mr3724205iod.230.1492904945095; Sat, 22 Apr 2017 16:49:05 -0700 (PDT) In-Reply-To: <20170422234729.GL17319@brightrain.aerifal.cx> X-Gmail-Original-Message-ID: Xref: news.gmane.org gmane.comp.lib.glibc.alpha:71232 gmane.linux.lib.musl.general:11266 Archived-At: On Sat, Apr 22, 2017 at 7:47 PM, Rich Felker wrote: > On Sat, Apr 22, 2017 at 07:43:01PM -0400, Zack Weinberg wrote: >> On Sat, Apr 22, 2017 at 7:19 PM, Rich Felker wrote: >> >> > #define POSIX_SPAWN_SETSIGMASK 8 >> >> > #define POSIX_SPAWN_SETSCHEDPARAM 16 >> >> > #define POSIX_SPAWN_SETSCHEDULER 32 >> >> > +#define POSIX_SPAWN_SETSID 64 >> >> >> >> This overlaps with the glibc value for POSIX_SPAWN_USEVFORK; while we >> >> don't implement it, we also don't want to have mismatched constant >> >> ABI. >> .... >> > Thanks for all your work on this! Based on the glibc patch review, I'm >> > changing the error condition from !=0 to <0, and of course changing >> > the flag value to 128 to match. >> >> May I suggest that musl include a note in its headers, explaining that >> bit 64 is reserved to avoid an ABI conflict with glibc? Then the next >> time there's an addition, there will be less confusion. > > I was actually thinking of just adding POSIX_SPAWN_USEVFORK as a nop. > I think it will eventually be a nop on glibc too; maybe it already is > on Linux targets. Then we can have posix_spawnattr_setflags check > against all valid flags and return EINVAL if an unknown bit is set, so > that applications can runtime-probe for any future functionality > additions. Makes sense. zw