support for POSIX.1 job control terminal state management in dash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux