From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Godmar Back <godmar@gmail.com>, Libc-help <libc-help@sourceware.org>
Subject: Re: supporting terminal ownership assignment (tcsetpgrp()) in posix_spawn
Date: Mon, 7 Jun 2021 18:04:44 -0300 [thread overview]
Message-ID: <7298cb72-becb-80bb-b2df-d97bdb201e95@linaro.org> (raw)
In-Reply-To: <CAB4+JYJBiMLz7ZscY+7Z811RgDV2qAZgu4cB0TsOiyvwMDE2hg@mail.gmail.com>
On 03/06/2021 10:58, Godmar Back via Libc-help wrote:
> I've recently been playing with posix_spawn() and noticed that it lacks
> support for assigning terminal ownership (as would be done via
> tcsetpgrp()). As a consequence, it cannot be used for job control shells
> when starting jobs in the foreground [1].
>
> IBM's implementation of spawn [2] for zOS supports SPAWN_SETTCPGRP for this
> reason.
>
> Even though the POSIX spec states "Future Directions: None" I came across
> this Austin group issue [3] which proposes to add a way to set the child
> process's session id, and which appears to have been accepted in 2016. This
> is an example of evolution of posix_spawn.
>
> Is anyone aware of efforts to add something similar to POSIX, and more
> specifically, to Linux?
>
> If the current implementation of posix_spawn is library based (I'm guessing
> it is) then there would be nothing to prevent Linux from adding additional
> flags, just like QNX or Blackberry have already done ([3]).
Other OS might provide a syscall for posix_spawn (I know MacOSX does and
I think maybe Solaris as well), but for Linux is done on top of clone
syscall.
And glibc alread supports POSIX_SPAWN_SETSID since 2.26, so why can't you
use it along with with tcsetpgrp() called from the parent?
next prev parent reply other threads:[~2021-06-07 21:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 13:58 Godmar Back
2021-06-07 21:04 ` Adhemerval Zanella [this message]
2021-06-07 21:23 ` Godmar Back
2021-06-07 21:36 ` Adhemerval Zanella
2021-06-07 23:57 ` Godmar Back
2021-06-08 13:50 ` Adhemerval Zanella
2021-06-08 14:37 ` Godmar Back
2021-06-08 16:42 ` Adhemerval Zanella
2021-06-08 22:11 ` Godmar Back
2021-06-09 6:41 ` Florian Weimer
2021-06-09 12:00 ` Adhemerval Zanella
2021-06-09 13:12 ` Godmar Back
2021-06-11 13:45 ` Adhemerval Zanella
2021-06-11 23:58 ` Godmar Back
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=7298cb72-becb-80bb-b2df-d97bdb201e95@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=godmar@gmail.com \
--cc=libc-help@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).