zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: [BUG] zsh dies in case of EIO with echo in .zlogout / ENOTTY
Date: Mon, 12 Jul 2021 12:02:24 +0200	[thread overview]
Message-ID: <20210712100224.GA9599@cventin.lip.ens-lyon.fr> (raw)

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@vinc17.net> - 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)


             reply	other threads:[~2021-07-12 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 10:02 Vincent Lefevre [this message]
2021-07-12 12:13 ` Peter Stephenson
2021-07-14  8:04   ` Vincent Lefevre
2021-07-12 16:46 ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210712100224.GA9599@cventin.lip.ens-lyon.fr \
    --to=vincent@vinc17.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).