dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* support for POSIX.1 job control terminal state management in dash
@ 2020-06-23 12:41 Godmar Back
  0 siblings, 0 replies; only message in thread
From: Godmar Back @ 2020-06-23 12:41 UTC (permalink / raw)
  To: dash


POSIX 1003.1 (2008) asks of job control shells this:

"When a foreground (not background) job stops, the shell must sample
and remember the current terminal settings so that it can restore them
later when it continues the stopped job in the foreground (via the
tcgetattr( ) and tcsetattr( ) functions)."

The rationale is, in my view, a sound one: a job control shell should
provide the abstraction that job-control unaware programs executing
under it have unfettered access to their terminal even when subject to
job control.

Unlike other POSIX shells such as ksh, dash 0.5.8-2.10, however, does
not appear to do that. In fact, it appears that no terminal-related
action takes place at all when it learns that a child process has been
suspended via SIGTSTP, and also no action is done when the child is
continued in the foreground.

I would be curious to hear the reasons for why dash chose to deviate
from the POSIX specification in this respect.

 - Godmar

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-23 12:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 12:41 support for POSIX.1 job control terminal state management in dash 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 NNTP newsgroup(s).