From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?SmFuIERqw6Rydg==?= Newsgroups: gmane.emacs.devel Subject: Re: Change in process.c Date: Thu, 29 Mar 2007 08:12:13 +0200 Message-ID: <460B58BD.6050303@swipnet.se> References: <87ejna5qwa.fsf@stupidchicken.com> <460A73BE.8020304@gnu.org> <460A8906.5080002@gnu.org> <460ABD1D.6080605@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1175148782 3893 80.91.229.12 (29 Mar 2007 06:13:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2007 06:13:02 +0000 (UTC) Cc: Andreas Schwab , Chong Yidong , Sam Steingold , rms@gnu.org, emacs-devel@gnu.org To: "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 29 08:12:55 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HWnsT-0001w8-9H for ged-emacs-devel@m.gmane.org; Thu, 29 Mar 2007 08:12:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWnv0-0008SF-Qo for ged-emacs-devel@m.gmane.org; Thu, 29 Mar 2007 01:15:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HWnux-0008Ry-L3 for emacs-devel@gnu.org; Thu, 29 Mar 2007 02:15:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HWnuv-0008Rl-CR for emacs-devel@gnu.org; Thu, 29 Mar 2007 02:15:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWnuv-0008Ri-7c for emacs-devel@gnu.org; Thu, 29 Mar 2007 01:15:25 -0500 Original-Received: from av8-1-sn3.vrr.skanova.net ([81.228.9.183]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HWns4-0006zR-Ud; Thu, 29 Mar 2007 02:12:30 -0400 Original-Received: by av8-1-sn3.vrr.skanova.net (Postfix, from userid 502) id 4A7F93871B; Thu, 29 Mar 2007 08:12:23 +0200 (CEST) Original-Received: from smtp3-2-sn3.vrr.skanova.net (smtp3-2-sn3.vrr.skanova.net [81.228.9.102]) by av8-1-sn3.vrr.skanova.net (Postfix) with ESMTP id 1473A38709; Thu, 29 Mar 2007 08:12:23 +0200 (CEST) Original-Received: from husetbladh.homeip.net (81-235-205-78-no59.tbcn.telia.com [81.235.205.78]) by smtp3-2-sn3.vrr.skanova.net (Postfix) with ESMTP id AF0B937E42; Thu, 29 Mar 2007 08:12:22 +0200 (CEST) User-Agent: Thunderbird 1.5.0.10 (X11/20070302) In-Reply-To: X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68735 Archived-At: Kim F. Storm skrev: > Jan Dj=C3=A4rv writes: >=20 >> I can see this too. But it is this code that gets executed over and >> over again (process.c, line 4810 or so): >=20 > Good catch!! >=20 > Does the following patch give good results? Yes, the problem is completely gone. Can the original poster (Sam Steing= old?=20 I forgot) also confirm? Jan D. >=20 > *** process.c 28 Mar 2007 11:18:56 +0200 1.508 > --- process.c 28 Mar 2007 22:55:11 +0200=09 > *************** > *** 4820,4826 **** > got lost. So raise the signl again just in case. > It can't hurt. */ > else if (nread =3D=3D -1 && errno =3D=3D EIO) > ! kill (getpid (), SIGCHLD); > #endif /* HAVE_PTYS */ > /* If we can detect process termination, don't consider the pr= ocess > gone just because its pipe is closed. */ > --- 4820,4832 ---- > got lost. So raise the signl again just in case. > It can't hurt. */ > else if (nread =3D=3D -1 && errno =3D=3D EIO) > ! { > ! /* Clear the descriptor now, so we only raise the signal once. *= / > ! FD_CLR (channel, &input_wait_mask); > ! FD_CLR (channel, &non_keyboard_wait_mask); > !=20 > ! kill (getpid (), SIGCHLD); > ! } > #endif /* HAVE_PTYS */ > /* If we can detect process termination, don't consider the pr= ocess > gone just because its pipe is closed. */ > *************** > *** 6502,6512 **** > /* Keep trying to get a status until we get a definitive result= . */ > do > { > - /* For some reason, this sleep() prevents Emacs from sending > - loadavg to 5-8(!) for ~10 seconds. > - See http://thread.gmane.org/gmane.emacs.devel/67722 or > - http://www.google.com/search?q=3Dbusyloop+in+sigchld_han= dler */ > - usleep (1000); > errno =3D 0; > pid =3D wait3 (&w, WNOHANG | WUNTRACED, 0); > } > --- 6508,6513 ---- >=20