Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Functions that start Jobs
- X-seq: zsh-users 3983
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Functions that start Jobs
- Date: Fri, 29 Jun 2001 16:34:46 +0000
- In-reply-to: <200106290916.LAA04443@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200106290916.LAA04443@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
On Jun 29, 11:16am, Sven Wischnowsky wrote:
} Subject: Re: Functions that start Jobs
}
} Vincent Lefevre wrote:
}
} > What happens if Ctrl-Z is typed while a builtin
} > is being executed?
}
} (Very good. ;-) That won't work because we need something to find out
} that something got suspended. Some time ago we were discussing if it
} was possible to make this work, too. I don't remember exactly, but
} nothing came of it.
It'd be pretty messy. We'd either have to fork() in a signal handler
(which I'm sure is not a good idea), or else set a flag for TSTP the way
zsh presently does for INT -- and then at every point where we check the
INT'd flag, also check the TSTP'd flag and fork(), with the child then
STOPping itself and the parent breaking out as if INT'd.
Or we could use pthreads and put every command that's executed in the
current shell into its own thread. But without a massive rewrite, we'd
have to make sure that no more than one thread at a time (including the
"parent" one) was ever executing -- so either it would not be possible
to put a stopped builtin in the background, or we'd still have to fork()
and continue only one thread in each process, and I'm really not sure if
that works any better than forking in a signal handler.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author