summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-04-16 12:43:46 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-04-16 12:43:46 -0700
commit290d7ac277986bd118e594a8100b3f40e4492cb1 (patch)
treed63a3aa61cac577dd119665edaffe2def8d194e2 /src/callproc.c
parent37eccff4f72c5a36dcd4b89d417b0047aab84e50 (diff)
parentb262bde327db2cd9b2f01f2d3ed946d0b188cb9d (diff)
downloademacs-290d7ac277986bd118e594a8100b3f40e4492cb1.tar.gz
Merge from emacs-24; up to 2014-04-16T15:28:26Z!monnier@iro.umontreal.ca
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 2147c173655..a2c52e5b5ba 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -105,6 +105,8 @@ enum
static Lisp_Object call_process (ptrdiff_t, Lisp_Object *, int, ptrdiff_t);
+
+#ifndef MSDOS
/* Block SIGCHLD. */
void
@@ -124,6 +126,8 @@ unblock_child_signal (sigset_t const *oldset)
pthread_sigmask (SIG_SETMASK, oldset, 0);
}
+#endif /* !MSDOS */
+
/* Return the current buffer's working directory, or the home
directory if it's unreachable, as a string suitable for a system call.
Signal an error if the result would not be an accessible directory. */
@@ -162,6 +166,7 @@ encode_current_directory (void)
void
record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile)
{
+#ifndef MSDOS
sigset_t oldset;
block_child_signal (&oldset);
@@ -173,6 +178,7 @@ record_kill_process (struct Lisp_Process *p, Lisp_Object tempfile)
}
unblock_child_signal (&oldset);
+#endif /* !MSDOS */
}
/* Clean up files, file descriptors and processes created by Fcall_process. */
@@ -212,6 +218,7 @@ call_process_cleanup (Lisp_Object buffer)
{
Fset_buffer (buffer);
+#ifndef MSDOS
if (synch_process_pid)
{
kill (-synch_process_pid, SIGINT);
@@ -223,6 +230,7 @@ call_process_cleanup (Lisp_Object buffer)
immediate_quit = 0;
message1 ("Waiting for process to die...done");
}
+#endif /* !MSDOS */
}
#ifdef DOS_NT
@@ -520,10 +528,10 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
char const *outf = tmpdir ? tmpdir : "";
tempfile = alloca (strlen (outf) + 20);
strcpy (tempfile, outf);
- dostounix_filename (tempfile, 0);
+ dostounix_filename (tempfile);
if (*tempfile == '\0' || tempfile[strlen (tempfile) - 1] != '/')
strcat (tempfile, "/");
- strcat (tempfile, "detmp.XXX");
+ strcat (tempfile, "emXXXXXX");
mktemp (tempfile);
if (!*tempfile)
report_file_error ("Opening process output file", Qnil);
@@ -712,8 +720,6 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
unblock_child_signal (&oldset);
unblock_input ();
-#endif /* not MSDOS */
-
if (pid < 0)
report_file_errno ("Doing vfork", Qnil, child_errno);
@@ -728,6 +734,8 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
emacs_close (filefd);
clear_unwind_protect (count - 1);
+#endif /* not MSDOS */
+
if (INTEGERP (buffer))
return unbind_to (count, Qnil);
@@ -1674,10 +1682,8 @@ syms_of_callproc (void)
{
#ifndef DOS_NT
Vtemp_file_name_pattern = build_string ("emacsXXXXXX");
-#elif defined (WINDOWSNT)
+#else /* DOS_NT */
Vtemp_file_name_pattern = build_string ("emXXXXXX");
-#else
- Vtemp_file_name_pattern = build_string ("detmp.XXX");
#endif
staticpro (&Vtemp_file_name_pattern);