From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: job-control
Date: Tue, 1 Feb 2000 16:35:21 +0000 [thread overview]
Message-ID: <1000201163521.ZM6426@candle.brasslantern.com> (raw)
In-Reply-To: <200002011058.LAA07413@beta.informatik.hu-berlin.de>
On Feb 1, 11:58am, Sven Wischnowsky wrote:
} Subject: Re: PATCH: job-control
}
}
} I wrote:
}
} > But removing those two child_* and
} > adding:
} >
} > if (list_pipe_job && jobtab[list_pipe_job].procs &&
} > !(jobtab[list_pipe_job].stat & STAT_STOPPED))
} > child_suspend(0);
} >
} > before the if (!list_pipe_child && ...) fixes the problem, too and is
} > almost certainly better. Can anyone see a problem with this?
}
} No, we would also need a child_block, then, so we can use
} child_unblock()/child_block() after this test.
Waitaminute, now I'm *really* confused.
} - if (!(jn->stat & STAT_LOCKED)) {
} - child_unblock();
} + if (!(jn->stat & STAT_LOCKED))
} waitjobs();
} +
} + if (list_pipe_job && jobtab[list_pipe_job].procs &&
} + !(jobtab[list_pipe_job].stat & STAT_STOPPED)) {
} + child_unblock();
} child_block();
} }
So now you're saying it works to do the child_unblock() *after* the
waitjobs() rather than before? That makes no sense; waitjobs() does
a child_unblock() at the end. So if the previous child_unblock()
(inside the !STAT_LOCKED test) worked, then waitjobs() was getting
called, and this child_unblock() shouldn't make any difference.
Unless this one is happening in a different call to execpline()? Does
the patch below work too?
In any case, that last child_block() above should be outside the close
brace.
Index: Src/exec.c
===================================================================
@@ -981,13 +981,11 @@
makerunning(jn);
}
if (!(jn->stat & STAT_LOCKED))
- waitjobs();
-
- if (list_pipe_job && jobtab[list_pipe_job].procs &&
- !(jobtab[list_pipe_job].stat & STAT_STOPPED)) {
- child_unblock();
- child_block();
- }
+ waitjobs(); /* Implicit child_unblock() */
+ else if (list_pipe_job && jobtab[list_pipe_job].procs &&
+ !(jobtab[list_pipe_job].stat & STAT_STOPPED))
+ child_unblock(); /* Permit job table update */
+ child_block(); /* Freeze job table again */
if (list_pipe_child &&
jn->stat & STAT_DONE &&
lastval2 & 0200)
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
next prev parent reply other threads:[~2000-02-01 16:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-01 10:58 Sven Wischnowsky
2000-02-01 16:35 ` Bart Schaefer [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-02-02 8:25 Sven Wischnowsky
2000-01-31 12:53 Sven Wischnowsky
2000-01-31 10:00 Sven Wischnowsky
2000-01-31 10:47 ` Bart Schaefer
2000-01-31 11:52 ` Bart Schaefer
2000-01-18 11:36 Sven Wischnowsky
2000-01-29 18:13 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1000201163521.ZM6426@candle.brasslantern.com \
--to=schaefer@candle.brasslantern.com \
--cc=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).