comparison src/keyboard.c @ 53343:56e4b7166995

Make sure secondary frames are deleted when emacsclient quits. lisp/server.el (server-sentinel): Delete frame if alive. Fix delq invocation on server-frames. (server-process-filter, server-buffer-done): Fix delq invocation on server-frames. src/cm.c (cmputc): Abort on write error, see what happens. src/keyboard.c (read_avail_input): Do delete_tty on read errors. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-21
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 29 Dec 2003 08:28:35 +0000
parents d4e6a050c9b1
children 1682917e56b4
comparison
equal deleted inserted replaced
53342:201b17b0f2e5 53343:56e4b7166995
6687 if (nread == -1 && errno == EIO) 6687 if (nread == -1 && errno == EIO)
6688 { 6688 {
6689 if (! tty_list->next) 6689 if (! tty_list->next)
6690 kill (0, SIGHUP); /* This was the last terminal. */ 6690 kill (0, SIGHUP); /* This was the last terminal. */
6691 else 6691 else
6692 ; /* XXX tty should be closed here. */ 6692 delete_tty (tty); /* XXX I wonder if this is safe here. */
6693 } 6693 }
6694 #if defined (AIX) && (! defined (aix386) && defined (_BSD)) 6694 #if defined (AIX) && (! defined (aix386) && defined (_BSD))
6695 /* The kernel sometimes fails to deliver SIGHUP for ptys. 6695 /* The kernel sometimes fails to deliver SIGHUP for ptys.
6696 This looks incorrect, but it isn't, because _BSD causes 6696 This looks incorrect, but it isn't, because _BSD causes
6697 O_NDELAY to be defined in fcntl.h as O_NONBLOCK, 6697 O_NDELAY to be defined in fcntl.h as O_NONBLOCK,
6699 if (nread == 0) 6699 if (nread == 0)
6700 { 6700 {
6701 if (! tty_list->next) 6701 if (! tty_list->next)
6702 kill (0, SIGHUP); /* This was the last terminal. */ 6702 kill (0, SIGHUP); /* This was the last terminal. */
6703 else 6703 else
6704 ; /* XXX tty should be closed here. */ 6704 delete_tty (tty); /* XXX I wonder if this is safe here. */
6705 } 6705 }
6706 #endif 6706 #endif
6707 } 6707 }
6708 while ( 6708 while (
6709 /* We used to retry the read if it was interrupted. 6709 /* We used to retry the read if it was interrupted.