Re: [execline] [RFC] Allow `foreground` to handle signals

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Sun, 27 Jun 2021 22:13:27 +0000

>Isn't job control the task of commands such as `foreground` and
>`background`?

  No, it's not. "foreground" means that the script waits for the
process being spawned to exit before resuming; "background" means that
the parent and the child execute in parallel. This has nothing to do
with job control.


>Is your opinion that this modified foreground is outside the scope of
>execline,
>ant thus there should it be a toolset for job control?

  Yes, and maybe. Job control is out of scope of regular execline
binaries, and I don't think that execline can bring much value over a
shell when interactivity is involved, so I'm in no hurry to write a
toolset for job control - but if you have worthwhile ideas for it,
feel free to submit them.


>Thanks, this is half the answer, now the editor receives the signals,
>the other half of the answer is spwaning the next process
>when the editor exits.
>
>As of now, on the terminal one needs to use `fg` to continue the process.

  It sounds like your previous foreground process group (i.e. the
processes that launch your script) attempted to write to, or read from,
the terminal while your editor was running. That is pretty weird.
Replace -g with -f, see what happens. If your editor is stopped, just
remove the options entirely and run the editor in a new session; it
looks like your caller program is buggy.

--
  Laurent
Received on Mon Jun 28 2021 - 00:13:27 CEST

This archive was generated by hypermail 2.4.0 : Mon Jun 28 2021 - 00:13:56 CEST