From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11265 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general,gmane.comp.lib.glibc.alpha Subject: Re: [PATCH] add support for POSIX_SPAWN_SETSID Date: Sat, 22 Apr 2017 19:47:29 -0400 Message-ID: <20170422234729.GL17319@brightrain.aerifal.cx> References: <20170331050243.4485-1-quae@daurnimator.com> <20170331160156.GL17319@brightrain.aerifal.cx> <20170422231933.GK17319@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1492904860 13593 195.159.176.226 (22 Apr 2017 23:47:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Apr 2017 23:47:40 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com, GNU C Library Original-X-From: musl-return-11280-gllmg-musl=m.gmane.org@lists.openwall.com Sun Apr 23 01:47:37 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1d24ka-0003SC-U2 for gllmg-musl@m.gmane.org; Sun, 23 Apr 2017 01:47:37 +0200 Original-Received: (qmail 13793 invoked by uid 550); 22 Apr 2017 23:47:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13774 invoked from network); 22 Apr 2017 23:47:40 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:11265 gmane.comp.lib.glibc.alpha:71231 Archived-At: 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. Rich