diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-16 15:40:17 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-16 15:40:17 -0700 |
commit | 50a30ccec8932037b7f56122d723037cf8993147 (patch) | |
tree | 4e4cf897070ea0814fc95a7f46c4d63e919522eb /src/callproc.c | |
parent | 41d48a42df6ce4e5af9543f97313e256f16aa900 (diff) | |
download | emacs-50a30ccec8932037b7f56122d723037cf8993147.tar.gz |
Fix w32 bug with call-process-region.
* callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
to Fcall_process when the input is empty. This simplifies the
code a bit. It makes no difference on POSIXish platforms but
apparently it fixes a bug on w32.
Fixes: debbugs:14885
Diffstat (limited to 'src/callproc.c')
-rw-r--r-- | src/callproc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/callproc.c b/src/callproc.c index f2c8c0c6223..85ebf449e43 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1093,7 +1093,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r (ptrdiff_t nargs, Lisp_Object *args) { struct gcpro gcpro1; - Lisp_Object filename_string; + Lisp_Object infile; ptrdiff_t count = SPECPDL_INDEX (); Lisp_Object start = args[0]; Lisp_Object end = args[1]; @@ -1111,10 +1111,8 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r empty_input = XINT (start) == XINT (end); } - filename_string = (empty_input - ? build_string (NULL_DEVICE) - : create_temp_file (nargs, args)); - GCPRO1 (filename_string); + infile = empty_input ? Qnil : create_temp_file (nargs, args); + GCPRO1 (infile); if (nargs > 3 && !NILP (args[3])) Fdelete_region (start, end); @@ -1129,7 +1127,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r args[0] = args[2]; nargs = 2; } - args[1] = filename_string; + args[1] = infile; RETURN_UNGCPRO (unbind_to (count, Fcall_process (nargs, args))); } |