[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-use-null-device
From: |
Stefan Monnier |
Subject: |
Re: grep-use-null-device |
Date: |
Tue, 30 Aug 2005 22:31:42 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> 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(#<process grep>)
> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-devel
- grep-use-null-device, Emilio Lopes, 2005/08/15
- Re: grep-use-null-device, Richard M. Stallman, 2005/08/15
- Re: grep-use-null-device, Karl Chen, 2005/08/16
- Re: grep-use-null-device, Emilio Lopes, 2005/08/16
- Re: grep-use-null-device, Richard M. Stallman, 2005/08/17
- Re: grep-use-null-device, Eli Zaretskii, 2005/08/20
- "^D^H^H" in process output on Darwin (Was Re: grep-use-null-device), YAMAMOTO Mitsuharu, 2005/08/26
- Re: "^D^H^H" in process output on Darwin, Stefan Monnier, 2005/08/29
- Re: grep-use-null-device, Juri Linkov, 2005/08/29
- Re: grep-use-null-device, Richard M. Stallman, 2005/08/30
- Re: grep-use-null-device,
Stefan Monnier <=
- Re: grep-use-null-device, Juri Linkov, 2005/08/31
Re: grep-use-null-device, Emilio Lopes, 2005/08/16