From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Steven Tamm Newsgroups: gmane.emacs.devel Subject: Re: Mac OS X - Hang / C-g problem patch Date: Mon, 9 Dec 2002 10:09:37 -0800 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <60BC2832-0BA1-11D7-B27B-00039390AB82@mac.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v548) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1039459727 4373 80.91.224.249 (9 Dec 2002 18:48:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Dec 2002 18:48:47 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18LSxP-00018E-00 for ; Mon, 09 Dec 2002 19:48:43 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18LT7c-0007CP-00 for ; Mon, 09 Dec 2002 19:59:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18LSM3-0002oV-00 for emacs-devel@quimby.gnus.org; Mon, 09 Dec 2002 13:10:07 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18LSLg-0002o9-00 for emacs-devel@gnu.org; Mon, 09 Dec 2002 13:09:44 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18LSLd-0002nh-00 for emacs-devel@gnu.org; Mon, 09 Dec 2002 13:09:43 -0500 Original-Received: from smtpout.mac.com ([17.250.248.88]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18LSLd-0002nB-00 for emacs-devel@gnu.org; Mon, 09 Dec 2002 13:09:41 -0500 Original-Received: from asmtp01.mac.com (asmtp01-qfe3 [10.13.10.65]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id gB9I9cXf013921 for ; Mon, 9 Dec 2002 10:09:38 -0800 (PST) Original-Received: from mac.com ([12.236.43.16]) by asmtp01.mac.com (Netscape Messaging Server 4.15) with ESMTP id H6V6G100.F0N; Mon, 9 Dec 2002 10:09:37 -0800 Original-To: dme@dme.org In-Reply-To: X-Mailer: Apple Mail (2.548) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10005 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10005 Just remembered something from my async-read patch; read shouldn't call select if the fd is non-blocking (which may or may not be the issue here) Could you try this patch? Index: src/mac.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/mac.c,v retrieving revision 1.11 diff -u -d -b -w -r1.11 mac.c --- src/mac.c 8 Dec 2002 05:58:34 -0000 1.11 +++ src/mac.c 9 Dec 2002 17:50:45 -0000 @@ -32,6 +32,7 @@ #include #include #include +#include #if __MWERKS__ #include #endif @@ -2811,7 +2812,8 @@ int r; /* Use select to block on IO while still checking for quit_char */ - if (!inhibit_window_system && !noninteractive) + if (!inhibit_window_system && !noninteractive && + ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK)) { FD_ZERO (&rfds); FD_SET (fds, &rfds); == One other thing: does pressing C-g cause it to quit, or does it just hang? -Steven On Monday, December 9, 2002, at 02:13 AM, dme@dme.org wrote: > * steventamm@mac.com [2002-12-08 06:15:21] >> [...] > > I updated and re-configured, rebuilt, etc. > > When attempting to use ERC, emacs reliably hangs in sys_select(), due > to there being no bits set in rfds. Faking some bits using gdb lets > emacs carry on a little, but it hangs again quite quickly. The trace > is: > > (gdb) where > #0 0x90025cc8 in select () > #1 0x00117cb0 in sys_select (n=10, rfds=0xbfffdf60, wfds=0x0, > efds=0x0, timeout=0x0) at mac.c:2789 > #2 0x00117dd8 in sys_read (fds=-1073750176, buf=0x1
of bounds>, nbyte=3221217008) at mac.c:2818 > #3 0x0007b520 in emacs_read (fildes=9, buf=0xbfffe0b0 "", nbyte=1024) > at sysdep.c:3279 > #4 0x00102b80 in read_process_output (proc=1108160672, channel=9) at > process.c:4390 > #5 0x00102694 in wait_reading_process_input (time_limit=30, > microsecs=0, read_kbd=2571592, do_display=1) at process.c:4134 > #6 0x0000c454 in sit_for (sec=30, usec=0, reading=1, display=1, > initial_display=0) at dispnew.c:6247 > #7 0x0006674c in read_char (commandflag=1, nmaps=4, maps=0xbfffefa0, > prev_event=274970324, used_mouse_menu=0xbffff0a4) at keyboard.c:2630 > #8 0x0006e754 in read_key_sequence (keybuf=0xbffff170, > bufsize=33599088, prompt=274970324, dont_downcase_last=2362820, > can_return_switch_frame=1, fix_current_buffer=2350356) at > keyboard.c:8505 > #9 0x0006415c in command_loop_1 () at keyboard.c:1473 > #10 0x000c943c in internal_condition_case (bfun=0x63d34 > , handlers=275016892, hfun=0x636e4 ) at > eval.c:1352 > #11 0x00063b14 in command_loop_2 () at keyboard.c:1274 > #12 0x000c8edc in internal_catch (tag=4, func=0x63ad4 > , arg=274970324) at eval.c:1112 > #13 0x00063a6c in command_loop () at keyboard.c:1253 > #14 0x00063480 in recursive_edit_1 () at keyboard.c:969 > #15 0x00063608 in Frecursive_edit () at keyboard.c:1025 > #16 0x000620dc in main (argc=0, argv=0xbffffdf8) at emacs.c:1647 > #17 0x00003c48 in _start (argc=50, argv=0x0, envp=0x23b2b4) at > /SourceCache/Csu/Csu-45/crt.c:267 > #18 0x00003ac8 in start () > (gdb) up > #1 0x00117cb0 in sys_select (n=10, rfds=0xbfffdf60, wfds=0x0, > efds=0x0, timeout=0x0) at mac.c:2789 > 2789 if ((r = select (n, rfds, wfds, efds, &one_second)) > > 0) > (gdb) print *rfds > $27 = { > fds_bits = {0 } > } > (gdb) > > Has anyone else seen this ? I'll carry on looking... > > > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://mail.gnu.org/mailman/listinfo/emacs-devel