Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Implicit killing of subprocesses



Am 28.08.2013 15:26, schrieb Peter Stephenson:
> On Wed, 28 Aug 2013 14:54:32 +0200
> René Neumann <lists@xxxxxxxxx> wrote:
>> When I use
>>
>> coproc dbus-monitor
>> while read -p line; do ... done
>>
>> the dbus-monitor process lurks around after the script finishes
>> (breaking or returning from the loop).
> 
> Hmm... assuming this is interactive, you should see enough job control
> messages to alert you to what's going on.  With no options set, it would
> be something like:

It's non-interactive (a script).

> Not sure what happens non-interactively, coproc is really there for use
> with job control.

Ah darn. Using coprocs in scripts comes in handy when you want sth like:

coproc long_running

while read -p; ...

# something else

while read -p; ...


That's why, I thought it was meant for non-interactive cases.

- René



Messages sorted by: Reverse Date, Date, Thread, Author