+ emacs_close (fd1);
+#ifdef MSDOS
+ unlink (tempfile);
+#endif
+ report_file_error ("Cannot redirect stderr",
+ Fcons ((NILP (error_file)
+ ? build_string (NULL_DEVICE) : error_file),
+ Qnil));
+ }
+
+ current_dir = ENCODE_FILE (current_dir);
+
+#ifdef macintosh
+ {
+ /* Call run_mac_command in sysdep.c here directly instead of doing
+ a child_setup as for MSDOS and other platforms. Note that this
+ code does not handle passing the environment to the synchronous
+ Mac subprocess. */
+ char *infn, *outfn, *errfn, *currdn;
+
+ /* close these files so subprocess can write to them */
+ close (outfilefd);
+ if (fd_error != outfilefd)
+ close (fd_error);
+ fd1 = -1; /* No harm in closing that one! */
+
+ infn = XSTRING (infile)->data;
+ outfn = tempfile;
+ if (NILP (error_file))
+ errfn = NULL_DEVICE;
+ else if (EQ (Qt, error_file))
+ errfn = outfn;
+ else
+ errfn = XSTRING (error_file)->data;
+ currdn = XSTRING (current_dir)->data;
+ pid = run_mac_command (new_argv, currdn, infn, outfn, errfn);
+
+ /* Record that the synchronous process exited and note its
+ termination status. */
+ synch_process_alive = 0;
+ synch_process_retcode = pid;
+ if (synch_process_retcode < 0) /* means it couldn't be exec'ed */
+ {
+ synchronize_system_messages_locale ();
+ synch_process_death = strerror (errno);
+ }
+
+ /* Since CRLF is converted to LF within `decode_coding', we can
+ always open a file with binary mode. */
+ fd[0] = open (tempfile, O_BINARY);
+ if (fd[0] < 0)
+ {
+ unlink (tempfile);
+ close (filefd);
+ report_file_error ("Cannot re-open temporary file", Qnil);
+ }
+ }
+#else /* not macintosh */
+#ifdef MSDOS /* MW, July 1993 */
+ /* Note that on MSDOS `child_setup' actually returns the child process
+ exit status, not its PID, so we assign it to `synch_process_retcode'
+ below. */
+ pid = child_setup (filefd, outfilefd, fd_error, (char **) new_argv,
+ 0, current_dir);
+
+ /* Record that the synchronous process exited and note its
+ termination status. */
+ synch_process_alive = 0;
+ synch_process_retcode = pid;
+ if (synch_process_retcode < 0) /* means it couldn't be exec'ed */
+ {
+ synchronize_system_messages_locale ();
+ synch_process_death = strerror (errno);