Sidelines: Bugs, Work items, Interesting article on tty signals

4 views
Skip to first unread message

Ingo Albrecht

unread,
Nov 20, 2020, 8:37:14 AM11/20/20
to klis...@googlegroups.com
== Bug: Stopping children

Another thing I noticed is that it is possible to suspend the entire
clish session by pressing CTRL-Z on a child with interrupted="true".

This is definitely incorrect behavior.

Fixing this requires using some terminal magic. What exactly I'm not
sure of yet.

UNIX shells also have job handling to care about, but clish can probably
work around this by allowing only one running child/pipeline/shell.

Not sure how this would play out if clish was the SHELL - which probably
does not work anyway because then clish would also try to run itself.


== Work item: Child handling

clish does not have nice child handling and does not have proper
high-level abstractions for children and waiting. This was a hindrance
to me for introducing background log support and also paging support.
The long-term solution would probably be to use an event loop.


== Work item: Use of mktemp

Needs to be replaced by mkstemp.

Not sure if there is a reason to be backwards-compatible.

Probably not on current production systems.


== Research: Article on SIGTTIN/SIGTTOU

While researching the stopping problem I came across this nice article
that explains some (sparsely documented) aspects of those signals:

http://curiousthing.org/sigttin-sigttou-deep-dive-linux
[A Deep Dive into the SIGTTIN / SIGTTOU Terminal Access Control
Mechanism in Linux]

Another article linked there that is still on my reading list:

http://www.linusakesson.net/programming/tty/
[The TTY demystified]
Reply all
Reply to author
Forward
0 new messages