Sidelines: project infrastructure, bugs, interesting article

Skip to first unread message

Ingo Albrecht

Nov 24, 2020, 4:22:48 AM11/24/20
Hey everyone,

Here are some notes on some sidelines that I took during my work on clish.

Some of these should really be tickets, but it seems that
does not allow creating accounts.


== Project chat

Another thing that I think might be useful is a chat:

New-school solution would be something like which
integrates with GitHub, and they will switch to Matrix in the future.

Old-school chat solution would be Freenode IRC. Works for me but I'm not
keen on it. Would probably use the web interface.

In any case a chat allows on-the-side communication without imposing
much. Should work especially well for a low-traffic project like klish.

Serf: what do you say about this?

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


While researching the stopping problem I came across this nice article
that explains some (sparsely documented) aspects of those signals:
[A Deep Dive into the SIGTTIN / SIGTTOU Terminal Access Control
Mechanism in Linux]

Another article linked there that is still on my reading list:
[The TTY demystified]

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

== 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.
Reply all
Reply to author
0 new messages