Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!hplabs!hplabsz!mayer From: mayer@hplabsz.HPL.HP.COM (Niels Mayer) Newsgroups: comp.emacs Subject: question/buggestion about gnuemacs' call-process Message-ID: <698@hplabsz.HPL.HP.COM> Date: Fri, 21-Aug-87 02:16:21 EDT Article-I.D.: hplabsz.698 Posted: Fri Aug 21 02:16:21 1987 Date-Received: Sat, 22-Aug-87 19:26:16 EDT Reply-To: mayer@hplabsz.UUCP (Niels Mayer) Organization: Hewlett-Packard Laboratories Lines: 57 Summary: don't tell me this is impossible too! As far as I can tell, the function call-process will not return the exit status of the program that it runs. (both version 18.44 and 18.47) For example: 1-elisp) (call-process "grep" nil (get-buffer-create "out") t "hplnpm" "/etc/wank") --> nil (progn (set-buffer "out") (buffer-string)) --> "grep: can't open /etc/wank" 1-csh) hplnpm[3] ~> grep hplnpm /etc/wank & --> [1] 410 --> grep: can't open /etc/wank --> [1] Exit 2 grep hplnpm /etc/wank 2-elisp) (call-process "grep" nil (get-buffer-create "out") t "hplnpm" "/etc/hosts") --> nil (progn (set-buffer "out") (buffer-string)) --> "666.666.666.666 hplnpm beelzebub # DCC HP-UX Bobcat-20" 2-csh) hplnpm[4] ~> grep hplnpm /etc/hosts & --> [1] 412 --> 666.666.666.666 hplnpm beelzebub # DCC HP-UX Bobcat-20 --> [1] Done grep hplnpm /etc/hosts 3-elisp) (call-process "grep" nil (get-buffer-create "out") t "wank" "/etc/hosts") --> nil (progn (set-buffer "out") (buffer-string)) --> "" 3-csh) hplnpm[5] ~> grep wank /etc/hosts & --> [2] 413 --> [2] Exit 1 grep wank /etc/hosts Obviously, it would lead to far less kludgy emacs-lisp programs if call-process returned the exit status of the program that it runs, since many unix programs return useful information in the exit status. It leads to total grodyness if one has to figure out what went wrong with the program from the program's stdout. Does anybody have a modified call-process that can do this? If not, could the gnuemacs developers take this as an enhancement request? I'd be willing to do it myself, given appropriate hints from any willing gnuru or gnu bhagwan. ------------------------------------------------------------------------------- Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com Hewlett-Packard Laboratories Palo Alto, CA. *