> 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
> [email protected]
> http://lists.gnu.org/mailman/listinfo/emacs-devel
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel