diff README.multi-tty @ 82987:1682917e56b4

Major bugfixes and slight enhancements. src/dispextern.h (get_tty_size, tabs_safe_p, init_baud_rate): Update prototypes. src/dispnew.c (window_change_signal): Update call to get_tty_size. src/frame.c (Fmake_terminal_frame): Ditto. src/keyboard.c (Fsuspend_emacs): Ditto. src/sysdep.c: Eliminate tty_outputs, wherever possible. (The exceptions are init_sys_modes and reset_sys_modes, which need access to tty-local parameters). (init_baud_rate): Change tty_output parameter to a simple file descriptor. (narrow_foreground_group, widen_foreground_group): Ditto. (tabs_safe_p, get_tty_size): Ditto. (init_sys_modes): Update narrow_foreground_group invocation. (reset_sys_modes): Update widen_foreground_group invocation. (request_sigio)[!FASYNC && STRIDE]: Fix function signature. src/term.c (delete_tty): Only close output file handle if it is different from input. Re-enable freeing of Wcm. (term_init): Update get_tty_size, tabs_safe_p and init_baud_rate invocations. lib-src/emacsclient.c (here): Renamed to frame. (longopts): Change --here to --frame. The -h short option may be confused with --help. (decode_options, print_help_and_exit): Update to reflect above changes. (main): Ditto. lisp/server.el (server-start): Fix frame-live-p call syntax. (server-process-filter): Handle 'emacsclient -f' without file arguments. Don't return any values to emacsclient when 'emacsclient -f -e'. (server-switch-buffer): Prevent infinite recursion when there are no files to edit. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-27
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 30 Dec 2003 19:27:57 +0000
parents 02a346f99eaf
children f82e3a6f5ccb
line wrap: on
line diff
--- a/README.multi-tty	Tue Dec 30 17:51:52 2003 +0000
+++ b/README.multi-tty	Tue Dec 30 19:27:57 2003 +0000
@@ -39,7 +39,7 @@
 then start up the emacs server (src/emacs, M-x server-start), and then
 (from a shell prompt on another terminal) start emacsclient with
 
-	lib-src/emacsclient -h  /optional/file/names...
+	lib-src/emacsclient -f /optional/file/names...
 
 You'll hopefully have two fully working, independent frames on
 separate terminals.  (This seems to be very useful, emacsclient starts
@@ -213,13 +213,7 @@
 
    (Seems to be working OK.)
 
-THINGS TO DO
-------------
-
-** Understand Emacs's low-level input system.  It seems
-   complicated. :-)
-
-** Fix mysterious memory corruption error with tty deletion.  To
+-- Fix mysterious memory corruption error with tty deletion.  To
    trigger it, try the following shell command:
 
 	while true; do TERM=no-such-terminal-definition emacsclient -h; done
@@ -230,17 +224,23 @@
    Why were these vars collected into a struct before multi-tty
    support?)
 
-   The bug does not seem to happen if the error occurs before terminal
-   initialization or if I comment out all xfree()s in delete_frame.
-   Update: yes it does, although it is much rarer.  Or maybe it's
-   another bug.
+   (Done.  Whew.  It turned out that the problem had nothing to do
+   with hypothetical external references to Wcm, or any other
+   tty_output component; it was simply that delete_tty closed the
+   filehandles of secondary ttys twice, resulting in fclose doubly
+   free()ing memory.  Utterly trivial matter.  I love the C's memory
+   management, it puts hair on your chest.)
 
-   Idea: Some of these errors may have been caused by having more
-   file handles than FD_SETSIZE.
+THINGS TO DO
+------------
+
+** Understand Emacs's low-level input system (it seems complicated) :-)
+   and maybe rewrite multi-tty input in terms of MULTIKBOARD.
 
 ** Find out why does Emacs abort when it wants to close its
    controlling tty.  Hint: chan_process[] array.  Hey, maybe
-   noninterrupt-IO would work, too?
+   noninterrupt-IO would work, too?  Update: no, there is no process
+   for stdin/out.
 
 ** Support raw secondary terminals.  (Note that SIGIO works only on
    the controlling terminal.) Hint: extend read_input_waiting() for
@@ -252,9 +252,21 @@
 ** Issue with SIGIO: it needs to be disabled during redisplay.  See if
    fcntl() kernel behaviour could be emulated by emacsclient.
 
+** Get rid of the accessor macros in termchar.h, or define macros for
+   all members.
+
 ** Make parts of struct tty_output accessible from Lisp.  The device
    name and the type is sufficient.
 
+** server.el: There are issues with saving files in buffers of closed
+   clients.  Try editing a file with emacsclient -f, and (without
+   saving it) do a delete-frame.  The frame is closed without
+   question, and a surprising confirmation prompt appears in another
+   frame.
+
+** emacsclient.el, server.el: Handle eval or file open errors when
+   doing -f.
+
 ** Export delete_tty to the Lisp environment, for emacsclient.
 
 ** Make sure C-g goes to the right frame.  This is hard, as SIGINT
@@ -283,6 +295,6 @@
 
 ** Fix DOS support (I can't do this myself).
 
-
+** Do a grep on XXX and ?? for more issues.
 
 ;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d