Revert "improve sanity check code"

This reverts commit 7e6543c4cd.
This commit is contained in:
Kurtis Rader
2017-01-24 07:34:51 -08:00
parent 64485167e9
commit bf2d61c6fd
3 changed files with 10 additions and 7 deletions

View File

@@ -984,16 +984,18 @@ int proc_format_status(int status) {
}
void proc_sanity_check() {
job_t *fg_job = NULL;
job_t *j;
job_t *fg_job = 0;
job_iterator_t jobs;
while (job_t *j = jobs.next()) {
while ((j = jobs.next())) {
if (!job_get_flag(j, JOB_CONSTRUCTED)) continue;
// More than one foreground job?
if (job_get_flag(j, JOB_FOREGROUND) && !(job_is_stopped(j) || job_is_completed(j))) {
if (fg_job) {
if (fg_job != 0) {
debug(0, _(L"More than one job in foreground: job 1: '%ls' job 2: '%ls'"),
fg_job->command_wcstr(), j->command_wcstr());
sanity_lose();