The user provided callback may call reaper_del(), in which case we
will crash when we also try to remove the child from the list.
Remove it from the list before the callback means reaper_del() (if
called by the callback) will just loop through the entire list without
finding the pid and thus do nothing.
When we are shutting down the terminal, we explicitly wait for the
child application to terminate (with a timeout, after which the child
process is killed).
I.e. there’s no need to let the reaper handle it. In fact, doing so
leads to a crash since we will have destroyed (and thus free:d) the
terminal instance when the reaper callback is called.
When tweak.allow-overflowing-double-width-glyphs=yes, then certain
glyphs are allowed to overflow into the neighbouring cell.
However, if the cell “owning” the double-width glyph is erased (_only_
that cell), then the cell overflowed into is not redrawn, causing
part of the double-width glyph to remain on screen.
To avoid checking for these glyphs when printing to the terminal (i.e
at parse time), simply mark both cells as dirty when we render the
overflowing glyph.
Yes, this means that the cells will always be re-rendered. We count on
them only making up a small portion of the screen.
Shutdown the terminal when the client process terminates, not when the
ptmx file descriptor is closed.
This fixes an issue where the terminal remains running after the
client process has terminated, if it spawned child processes that
inherited the ptmx file descriptor.
When calling ‘reaper_add()’, the caller can provide a callback. If
non-NULL, the reaper will call the callback to handle the actual
reaping.
If the callback is NULL, or if it returns false, the reaper reaps the
child process.
This _should_ only happen when we’re doing a partial PGO build, since
then the script is run in the parent terminal. In this case, the user
is expected to use --rows/--cols anyway.