GNU bug report logs - #5723
23.1.94; make-network-process and emacs hangs

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Mon, 15 Mar 2010 16:02:01 UTC

Severity: normal

Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Helmut Eller <eller.helmut <at> gmail.com>
Cc: 5723 <at> debbugs.gnu.org
Subject: bug#5723: 23.1.94; make-network-process and emacs hangs
Date: Thu, 18 Mar 2010 18:06:20 +0900
>>>>> On Thu, 18 Mar 2010 08:43:45 +0100, Helmut Eller <eller.helmut <at> gmail.com> said:

> * YAMAMOTO Mitsuharu [2010-03-18 02:57+0100] writes:
>> If your case blocks at `connect', then it can't be quit with C-g
>> regardless of SYNC_INPUT on those ports/systems, because atimer is
>> turned off during the `connect' call.

> Why is the timer turned off around connect?  Handling SIGALARM
> during connect doesn't seem much different from handling SIGIO.

I think your argument makes sense.

I don't know the reason why the timer is turned off around connect.
The related code was added by the following change:

  committer: Ken Raeburn <raeburn <at> raeburn.org>
  timestamp: Sat 2000-06-24 06:06:53 +0000
  message:
    * process.c (Fopen_network_stream): Turn off atimers for duration of call to
    connect.  (Patch from Gerd.)

  http://cvs.savannah.gnu.org/viewvc/emacs/src/process.c?root=emacs&r1=1.314&r2=1.315

And as of this change, SIGIO was also disabled.

25249 kwzh <at> gn |       /* Kernel bugs (on Ultrix at least) cause lossage (not just EINTR)
25249 kwzh <at> gn | 	 when connect is interrupted.  So let's not let it get interrupted.
25249 kwzh <at> gn | 	 Note we do not turn off polling, because polling is only used
25249 kwzh <at> gn | 	 when not interrupt_input, and thus not normally used on the systems
25249 kwzh <at> gn | 	 which have this bug.  On systems which use polling, there's no way
25249 kwzh <at> gn | 	 to quit if polling is turned off.  */
25249 kwzh <at> gn |       if (interrupt_input)
25249 kwzh <at> gn | 	unrequest_sigio ();
25249 kwzh <at> gn | 
25249 kwzh <at> gn |       immediate_quit = 1;
25249 kwzh <at> gn |       QUIT;
25249 kwzh <at> gn | 
29922 raeburn |       /* This turns off all alarm-based interrupts; the
29922 raeburn | 	 bind_polling_period call above doesn't always turn all the
29922 raeburn | 	 short-interval ones off, especially if interrupt_input is
29922 raeburn | 	 set.
29922 raeburn | 
29922 raeburn | 	 It'd be nice to be able to control the connect timeout
29922 raeburn | 	 though.  Would non-blocking connect calls be portable?  */
29922 raeburn |       turn_on_atimers (0);
25249 kwzh <at> gn |       ret = connect (s, lres->ai_addr, lres->ai_addrlen);
29922 raeburn |       turn_on_atimers (1);

Does anyone have the mailing list archive around 2000-06?  It's not
found at list.gnu.org.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp




This bug report was last modified 15 years and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.