dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Godmar Back <godmar@gmail.com>
To: dash@vger.kernel.org
Subject: support for POSIX.1 job control terminal state management in dash
Date: Tue, 23 Jun 2020 08:41:24 -0400	[thread overview]
Message-ID: <CAB4+JYKczqr=OO+2kMUE4oNkH_d9Ak9cwv_rk7Fh9jQPzUtTjA@mail.gmail.com> (raw)


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

                 reply	other threads:[~2020-06-23 12:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \
    --in-reply-to='CAB4+JYKczqr=OO+2kMUE4oNkH_d9Ak9cwv_rk7Fh9jQPzUtTjA@mail.gmail.com' \
    --to=godmar@gmail.com \
    --cc=dash@vger.kernel.org \
    --subject='Re: support for POSIX.1 job control terminal state management in dash' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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