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

Re: How to "STTY" when "setopt nointeractive"?



On Oct 19,  9:33pm, DervishD wrote:
}
}     Do you mean that STTY doesn't work *on purpose* because ZLE
} couldn't reset the tty if STTY were used?

That is what I meant.

} I took a look at the source code, just in case, but I didn't
} discovered any hint about STTY and INTERACTIVE relations.

It's actually not scripts/interactive, it's that STTY only applies
to the foreground job process leader, and commands in scripts do not
normally become process leaders.  Forcing zsh to think that it is
interactive causes the script to put the commands in their own
process groups (for job control).

    /* If the parameter STTY is set in the command's environment, *
     * we first run the stty command with the value of this       *
     * parameter as it arguments.                                 */
    if ((s = STTYval) && isatty(0) && (GETPGRP() == getpid())) {



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