You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This check doesn't make sense to me, I would think you would only want to check WUNTRACED for children, since checking it for the parent shell process seems useless, but maybe I'm missing something. Also in order to detect SIGCONT the option WCONTINUED would need to be used where available, something like:
Although maybe that check is too pedantic, I'm not sure if any major platforms lack support for WCONTINUED today.
Happy to make a PR but I feel like I don't understand the intention of the check unless priv->child is supposed to mean something different than I'm thinking, is it only supposed to be set for grandchildren?
The text was updated successfully, but these errors were encountered:
Inverting the check if (!priv->child) { above alone causes the job to exit if you send the worker process (e.g., sleep) SIGSTOP. You can prevent this by not returning here if priv-child is true:
The job still does not report its status properly though if you send SIGSTOP to sleep because the sleep (grand)child process itself is not tracked in the job (edit: it is added, but presumably that happens inside the background child, so it isn't actually tracked). However simply tracking it would not help because the job reports "running" if any of its child processes are running, and the main job process (child of mrsh, parent of sleep worker) is always running.
I'm assuming the intermediate job process is a simplification somehow, other shells like zsh don't use one. But regardless of that it doesn't seem useful to report the job status based on the status of that process, other than when it exits entirely perhaps. I'll keep exploring.
The problem seems to be here:
mrsh/shell/job.c
Line 228 in 280fdf5
This check doesn't make sense to me, I would think you would only want to check
WUNTRACED
for children, since checking it for the parent shell process seems useless, but maybe I'm missing something. Also in order to detect SIGCONT the optionWCONTINUED
would need to be used where available, something like:Although maybe that check is too pedantic, I'm not sure if any major platforms lack support for
WCONTINUED
today.Happy to make a PR but I feel like I don't understand the intention of the check unless
priv->child
is supposed to mean something different than I'm thinking, is it only supposed to be set for grandchildren?The text was updated successfully, but these errors were encountered: