comparison lisp/subr.el @ 10025:3b058e13d177

(start-process-shell-command): Don't use `exec'-- run the command in a child process.
author Richard M. Stallman <rms@gnu.org>
date Sat, 19 Nov 1994 14:06:09 +0000
parents df605fcd1e75
children be0081d9ba76
comparison
equal deleted inserted replaced
10024:d95a8d8ab0f4 10025:3b058e13d177
851 Remaining arguments are the arguments for the command. 851 Remaining arguments are the arguments for the command.
852 Wildcards and redirection are handled as usual in the shell." 852 Wildcards and redirection are handled as usual in the shell."
853 (cond 853 (cond
854 ((eq system-type 'vax-vms) 854 ((eq system-type 'vax-vms)
855 (apply 'start-process name buffer args)) 855 (apply 'start-process name buffer args))
856 ((eq system-type 'windows-nt) 856 ;; We used to use `exec' to replace the shell with the command,
857 (start-process name buffer shell-file-name shell-command-switch 857 ;; but that failed to handle (...) and semicolon, etc.
858 (mapconcat 'identity args " ")))
859 (t 858 (t
860 (start-process name buffer shell-file-name shell-command-switch 859 (start-process name buffer shell-file-name shell-command-switch
861 (concat "exec " (mapconcat 'identity args " ")))))) 860 (mapconcat 'identity args " ")))))
862 861
863 (defmacro save-match-data (&rest body) 862 (defmacro save-match-data (&rest body)
864 "Execute the BODY forms, restoring the global value of the match data." 863 "Execute the BODY forms, restoring the global value of the match data."
865 (let ((original (make-symbol "match-data"))) 864 (let ((original (make-symbol "match-data")))
866 (list 865 (list