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

Re: up-arrow no longer works right



On 20 ÐÐÑÑÐ 2009 18:16:17 Vincent Lefevre wrote:
> 15:29:05 ioctl(10, FIONREAD, [0])       = 0
> 15:29:05 ioctl(10, TIOCSPGRP, [20933])  = 0
> 15:29:05 ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig
> icanon echo ...}) = 0 15:29:05 ioctl(10, SNDCTL_TMR_STOP or TCSETSW,
> {B38400 opost isig -icanon -echo ...}) = -1 EINTR (Interrupted system
> call) 15:29:05 --- SIGCHLD (Child exited) @ 0 (0) ---
> 15:29:05 rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [CHLD], 8) = 0
> 15:29:05 rt_sigprocmask(SIG_SETMASK, [CHLD], ~[KILL STOP RTMIN RT_1],
> 8) = 0 15:29:05 wait4(4294967295, 0x7fffaf3a553c, WNOHANG|WSTOPPED,
> 0x7fffaf3a5310) = 0 15:29:05 rt_sigreturn(0xffffffff)       = -1
> EINTR (Interrupted system call) 15:29:05 write(10,
> "\r\33[m\33[27m\33[24m\33[Jvin% ", 22) = 22 [...]
>

Actually zsh explicitly contains code to retry failed system call:

# ifdef HAVE_TCGETATTR
#  ifndef TCSADRAIN
#   define TCSADRAIN 1  /* XXX Princeton's include files are screwed up 
*/
#  endif
        tcsetattr(SHTTY, TCSADRAIN, &ti->tio);
        while (tcsetattr(SHTTY, TCSADRAIN, &ti->tio) == -1 && errno == 
EINTR)
            ;
# else
        ioctl(SHTTY, TCSETS, &ti->tio);
        while (ioctl(SHTTY, TCSETS, &ti->tio) == -1 && errno == EINTR)
# endif
        /*      zerr("settyinfo: %e",errno)*/ ;

(looks like somewhat misplaced `;' but this should not be the reason).

May be it interacts with signal handling somehow.

Attachment: signature.asc
Description: This is a digitally signed message part.



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