Skip to content

Job control improvements#175

Closed
caseman wants to merge 5 commits intoemersion:masterfrom
caseman:job-control-refactor
Closed

Job control improvements#175
caseman wants to merge 5 commits intoemersion:masterfrom
caseman:job-control-refactor

Conversation

@caseman
Copy link
Copy Markdown

@caseman caseman commented Nov 14, 2020

Draft fix for #174

  • Fixes SIGSTOP/SIGCONT signal handling
  • removes intermediate fork in run_command_list_array for background jobs so that actual child state can be tracked properly
  • improves reliability of job status updates and notifications

I included a jobs.sh test script, but it isn't incorporated into the test target because it causes it hang. Running it separately it works fine though and exits cleanly. Also not sure if these tests are only for parity, if so then it needs more attention since I didn't attempt to run it in other shells yet.

See also XXX comments inline. In particular the one about the general fork abstraction. I feel like forking a job process could be generalized since it happens in several places.

Comment thread shell/job.c
// shell. Child processes want to block until their own children have
// terminated.
if (!priv->child) {
#ifdef WCONTINUED
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this the Archlinux build fails which is interesting since this was introduced in Linux afaik. It could be because of the build options though if they are excluding this somehow by specifying an older standard.

@caseman
Copy link
Copy Markdown
Author

caseman commented Nov 18, 2020

Superceded by: #176

@caseman caseman closed this Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant