public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH][BZ 21340] add support for POSIX_SPAWN_SETSID
Date: Mon, 03 Apr 2017 19:35:00 -0000	[thread overview]
Message-ID: <c8ba37a2-a3f2-8875-3af8-6fd0aa9066d1@linaro.org> (raw)
In-Reply-To: <f2125c2c-342d-b4c0-44a4-8d075044fc2b@redhat.com>



On 03/04/2017 16:12, Florian Weimer wrote:
> On 04/01/2017 04:29 PM, daurnimator wrote:
>> diff --git a/posix/spawn.h b/posix/spawn.h
>> index 36e3867e17..8d2ace1b87 100644
>> --- a/posix/spawn.h
>> +++ b/posix/spawn.h
>> @@ -60,6 +60,7 @@ typedef struct
>>  #ifdef __USE_GNU
>>  # define POSIX_SPAWN_USEVFORK        0x40
>>  #endif
>> +#define POSIX_SPAWN_SETSID        0x80
>>
> 
> Doesn't this add the flag to past POSIX versions?

I do not think this is an issue since afaik POSIX does not state any 
constraint regarding the flags values [1].  For instance, the example
library implementation uses spawn as example and just use constant
different than glibc [2].

In fact I wish we had never added this constant functionality and 
now that it is a no-op on Linux we can start to think about signalling
it is deprecated.  One option would just remove it from default
posix implementation (and just use fork) and stop to exporting it.
New flags will still need to use 0x80 unfortunately. 

> 
> I'd prefer if there was a test case for the new functionality, perhaps using the getsid function.

It seems a good idea indeed.

> 
> I wonder if we should add a new symbol version for posix_spawnattr_setflags, so that applications which do not perform error checking for the function call fail in a predictable manner.
> 

I do not follow, which semantic difference are you proposing for
posix_spawnattr_setflags that are not covered currently?

> Thanks,
> Florian

[1] http://pubs.opengroup.org/onlinepubs/9699919799/
[2] http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html

  reply	other threads:[~2017-04-03 19:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01 14:30 daurnimator
2017-04-03 18:39 ` Adhemerval Zanella
2017-04-03 19:12 ` Florian Weimer
2017-04-03 19:35   ` Adhemerval Zanella [this message]
2017-04-04  9:38     ` Florian Weimer
2017-04-04 10:41       ` Szabolcs Nagy
2017-04-04 11:05         ` Florian Weimer
2017-04-05  3:47 ` Daurnimator

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8ba37a2-a3f2-8875-3af8-6fd0aa9066d1@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).