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

Re: Running commands in a zpty worker



On Aug 11,  4:14pm, Mathias Fredriksson wrote:
}
} > Just be careful to remove the handler before the slave side of the pty
} > is closed (e.g., worker exits) or you may end up with a runaway handler.
} 
} Any tips on how I should go about doing this, can it be done with zle -D?

The doc:
          If no HANDLER is given, but an FD is present, any handler for
          that FD is removed.  If there is none, an error message is
          printed and status 1 is returned.

You can even do this from inside the handler function itself with

    zle -F $1

assuming that the handler has detected that the FD is no longer useful.



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