From: Godmar Back <godmar@gmail.com>
To: William Tambe via Libc-help <libc-help@sourceware.org>
Subject: supporting terminal ownership assignment (tcsetpgrp()) in posix_spawn
Date: Thu, 3 Jun 2021 09:58:06 -0400 [thread overview]
Message-ID: <CAB4+JYJBiMLz7ZscY+7Z811RgDV2qAZgu4cB0TsOiyvwMDE2hg@mail.gmail.com> (raw)
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]).
- Godmar
[1]
https://github.com/fish-shell/fish-shell/commit/5e371e8fe7cbdecd87678d50d06c12851213776e
[2]
https://www.ibm.com/docs/en/zos/2.2.0?topic=functions-spawn-spawnp-spawn-new-process
[3] https://www.austingroupbugs.net/view.php?id=1044
next reply other threads:[~2021-06-03 13:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 13:58 Godmar Back [this message]
2021-06-07 21:04 ` Adhemerval Zanella
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=CAB4+JYJBiMLz7ZscY+7Z811RgDV2qAZgu4cB0TsOiyvwMDE2hg@mail.gmail.com \
--to=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).