public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* supporting terminal ownership assignment (tcsetpgrp()) in posix_spawn
@ 2021-06-03 13:58 Godmar Back
  2021-06-07 21:04 ` Adhemerval Zanella
  0 siblings, 1 reply; 14+ messages in thread
From: Godmar Back @ 2021-06-03 13:58 UTC (permalink / raw)
  To: William Tambe via Libc-help

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-06-11 23:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 13:58 supporting terminal ownership assignment (tcsetpgrp()) in posix_spawn Godmar Back
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

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).