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

Re: idea of zsh feature



Peter Stephenson wrote:
>I was thinking about this and got as far as writing an xtermclone script.
>The big problem seems to be xterm needs to fork its own process while
>the zsh process needs to be forked from the old one.  This means you need
>another sentinel process for the xterm which is a bit ugly.

Right.  We really need a program that will close all its file descriptors
and block until the cloned zsh terminates.  The only real problem I
see is letting the process know the new zsh's PID -- although it can't
wait(2), it can poll in a pretty lightweight manner.  This applies to
any terminal, of course, not just xterm.

>                                                             Also, with
>zsh as it stands it's hard to get that sentinel process to pause cleanly;
>if that's going to be a common problem it would be worth adding a (trivial)
>pause builtin to the module.

I've been considering that myself.  A pause builtin would be generally
useful anyway, and I think it would more naturally fit into a module
offering sleep(1) as a builtin.  (We could, of course, enhance the sleep
builtin to use usleep(2), nanosleep(2) or select(2) for high-resolution
pauses.)

-zefram



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