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

Re: Zsh Guide chapter 5 (substitutions)



On page 74, 2nd para from the end,

  It seems a bit odd to signal a process to restart; why can't the operating
  system just restart it when you ask? The real answer is probably that signals
  provide an easy way for you to talk to the operating system without
  grovelling around in the dirt too much.

I think it's to provide a way for a process to save and restore state across
the suspension, by installing handlers for SIGTSTP and SIGCONT.  I can think of
a few cases I've come across where this applies :

- if the process has done anything horrible to its /dev/tty, (e.g. echo off,
  changed the per-line/per-char input (ICANON?) mode, made stdin use
  asynchronous I/O etc), which would leave an unusable environment for the user
  back at the shell prompt.

- some tools (verilog simulators etc) that use floating licenses seem to
  relinquish licenses when suspended and re-acquire them when restarted.  Very
  nice of them!

On Thu, Aug 16, 2001 at 12:00:18AM +0100, pws@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
> I've uploaded a new version of A User's Guide to the Z-Shell which you
> can find at
>   http://sunsite.dk/zsh/Guide/
> 
> The main addition is chapter 5, which talks about all forms of shell
> substitutions and expansions.  Chapter 3 has been slightly edited.  I'd
> be interested in any comments on either, of course.  It's possible

-- 
Richard Curnow---by day : SuperH Core Architecture at STMicroelectronics
curnowr@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
and by night >>---richard.curnow@xxxxxxxxxxxx://go.to/richard.curnow/---



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