--- - branch: netbsd-8 date: Fri Nov 17 14:56:52 UTC 2017 files: - new: 1.85.2.2 old: 1.85.2.1 path: src/bin/sh/jobs.c pathrev: src/bin/sh/jobs.c@1.85.2.2 type: modified id: 20171117T145652Z.95611c7fb35d16dbbd875be803864c5571f0eb7e log: "Pull up following revision(s) (requested by kre in ticket #337):\n\tbin/sh/jobs.c: revision 1.91 (patch)\n\nPR bin/52640 PR bin/52641\n\nDon't delete jobs from the jobs table merely because they finished,\nif they are not the job we are waiting upon. (bin/52640 part 1)\n\nIn a sub-shell environment, don't allow wait to find jobs from the\nparent shell that had already exited (before the sub-shell was\ncreated) and return status for them as if they are our children.\n(bin/52640 part 2)\n\nDon't have the \"jobs\" command also be an implicit \"wait\" command\nin non-interactive shells. (bin/52641)\n\nUse WCONTINUED (when it exists) so we can report on stopped jobs that\n\"mysteriously\" move back to running state without the user issuing\na \"bg\" command (eg: kill -CONT ) Previously they would keep\nbeing reported as stopped until they exited.\nWhen a job is detected as having changed status just as we're\nissuing a \"jobs\" command (i.e.: the change occurred between the last\nprompt and the jobs command being entered) don't report it twice,\nonce from the status change, and then again in the jobs command\noutput. \ Once is enough (keep the jobs output, suppress the other).\n\nApply some sanity to the way jobs_invalid is processed - ignore it\nin getjob() instead of just ignoring it most of the time there, and\ninstead always check it before calling getjob() in situations where\nwe can handle only children of the current shell. \ This allows the\n(totally broken) save/clear/restore of jobs_invalid in jobscmd() to\nbe done away with (previously an error while in the clear state would\nhave left jobs_invalid incorrectly cleared - shouldn't have mattered\nsince jobs_invalid => subshell => error causes exit, but better to be safe).\n\nAdd/improve the DEBUG more tracing.\n" module: src subject: 'CVS commit: [netbsd-8] src/bin/sh' unixtime: '1510930612' user: martin