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

[BUG] zsh dies in case of EIO with echo in .zlogout / ENOTTY



In my .zlogout, I have an "echo" command. However, if the terminal
is no longer there, the "echo" yields EIO errors and the remaining
of the .zlogout is not executed, e.g. with "echo foo" in .zlogout
and

  xterm -e strace -f -o str.out zsh -l

I get

17099 write(1, "foo\n", 4)              = -1 EIO (Input/output error)
17099 ioctl(2, TCGETS, 0x7ffc67792c80)  = -1 EIO (Input/output error)
17099 write(2, "/home/vlefevre/.zlogout:echo:7: "..., 64) = -1 EIO (Input/output error)
17099 ioctl(2, TCGETS, 0x7ffc67793030)  = -1 EIO (Input/output error)
17099 write(2, "/home/vlefevre/.zlogout:7: write"..., 59) = -1 EIO (Input/output error)
17099 rt_sigprocmask(SIG_BLOCK, [CHLD], [CHLD WINCH], 8) = 0
17099 rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD WINCH], 8) = 0
17099 ioctl(2, TCGETS, 0x7ffc67794790)  = -1 EIO (Input/output error)
17099 write(2, "/home/vlefevre/.zlogout:8: write"..., 39) = -1 EIO (Input/output error)
17099 close(11)                         = 0
17099 ioctl(10, TIOCSPGRP, [17096])     = -1 ENOTTY (Inappropriate ioctl for device)
17099 setpgid(0, 17096)                 = 0
17099 getpid()                          = 17099
17099 exit_group(1)                     = ?
17099 +++ exited with 1 +++

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




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