From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: grep-use-null-device Date: Tue, 30 Aug 2005 22:31:42 -0400 Message-ID: <878xyiyh2n.fsf-monnier+emacs@gnu.org> References: <87ll2kiczv.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1125456862 16987 80.91.229.2 (31 Aug 2005 02:54:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2005 02:54:22 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 31 04:54:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EAIj3-0001ye-JL for ged-emacs-devel@m.gmane.org; Wed, 31 Aug 2005 04:53:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EAInD-00038t-MJ for ged-emacs-devel@m.gmane.org; Tue, 30 Aug 2005 22:57:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EAIlh-0002TY-Sl for emacs-devel@gnu.org; Tue, 30 Aug 2005 22:56:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EAIlc-0002Rb-Nj for emacs-devel@gnu.org; Tue, 30 Aug 2005 22:56:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EAIlb-00029s-Bn for emacs-devel@gnu.org; Tue, 30 Aug 2005 22:56:00 -0400 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EAIQk-0001wd-PK for emacs-devel@gnu.org; Tue, 30 Aug 2005 22:34:27 -0400 Original-Received: from alfajor ([67.71.117.223]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050831023149.MQKN16985.tomts36-srv.bellnexxia.net@alfajor>; Tue, 30 Aug 2005 22:31:49 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id A8D6FD73F8; Tue, 30 Aug 2005 22:31:42 -0400 (EDT) Original-To: Juri Linkov In-Reply-To: <87ll2kiczv.fsf@jurta.org> (Juri Linkov's message of "Tue, 30 Aug 2005 01:43:48 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:42515 Archived-At: > With this change, when grep finishes too quickly (for example, after > searching in a nonexistent file), `process-send-eof' fails with the > following error: > Debugger entered--Lisp error: (error "Process grep not running") > process-send-eof(#) > compilation-start("grep -inH -e search file" grep-mode nil nil) > grep("grep -inH -e search file") > call-interactively(grep) > execute-extended-command(nil) > call-interactively(execute-extended-command) > `compilation-start' needs to check if the process is running > before calling `process-send-eof': That's odd. AFAICT no blobking operation takes place between the start-process and the process-send-eof, so the process-status should still be `run' no matter how quickly the process exits (because Emacs shouldn't process the SIGCHLD it receives until later). What am I missing? Stefan > Index: lisp/progmodes/compile.el > =================================================================== > RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v > retrieving revision 1.378 > diff -c -r1.378 compile.el > *** lisp/progmodes/compile.el 27 Aug 2005 14:38:21 -0000 1.378 > --- lisp/progmodes/compile.el 29 Aug 2005 22:18:30 -0000 > *************** > *** 1032,1038 **** > outbuf command)))) > ;; Make the buffer's mode line show process state. > (setq mode-line-process '(":%s")) > ! (when compilation-disable-input > (process-send-eof proc)) > (set-process-sentinel proc 'compilation-sentinel) > (set-process-filter proc 'compilation-filter) > --- 1032,1039 ---- > outbuf command)))) > ;; Make the buffer's mode line show process state. > (setq mode-line-process '(":%s")) > ! (when (and compilation-disable-input > ! (eq (process-status proc) 'run)) > (process-send-eof proc)) > (set-process-sentinel proc 'compilation-sentinel) > (set-process-filter proc 'compilation-filter) > -- > Juri Linkov > http://www.jurta.org/emacs/ > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel