X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fcallproc.c;h=e5766bae058caf2f6f2a5bd833f47df96414a71d;hb=98f1518a09e923a4f8b14b6a637cc283f02719bd;hp=59baf474a4d1e46ac0e94e339231a99e0aab4b2f;hpb=762383636a99307282c2d93d26c35c046ec24da1;p=chise%2Fxemacs-chise.git- diff --git a/src/callproc.c b/src/callproc.c index 59baf47..e5766ba 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -221,8 +221,8 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you buffer's current directory. We can't just have the child check for an error when it does the chdir, since it's in a vfork. */ - NGCPRO2 (current_dir, path); /* Caller gcprotects args[] */ current_dir = current_buffer->directory; + NGCPRO2 (current_dir, path); /* Caller gcprotects args[] */ current_dir = Funhandled_file_name_directory (current_dir); current_dir = expand_and_dir_to_file (current_dir, Qnil); #if 0 @@ -331,9 +331,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you REGISTER char **save_environ = environ; REGISTER int fd1 = fd[1]; int fd_error = fd1; - char **env; - - env = environ; /* Record that we're about to create a synchronous process. */ synch_process_alive = 1; @@ -361,10 +358,12 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you if (fd_error < 0) { + int save_errno = errno; close (filefd); close (fd[0]); if (fd1 >= 0) close (fd1); + errno = save_errno; report_file_error ("Cannot open", Fcons(error_file, Qnil)); } @@ -427,8 +426,10 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you #ifndef WIN32_NATIVE if (pid < 0) { + int save_errno = errno; if (fd[0] >= 0) close (fd[0]); + errno = save_errno; report_file_error ("Doing fork", Qnil); } #endif @@ -448,7 +449,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you { int nread; - int first = 1; int total_read = 0; Lisp_Object instream; struct gcpro ngcpro1; @@ -532,7 +532,6 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you if (!NILP (display) && INTERACTIVE) { - first = 0; redisplay (); } } @@ -865,6 +864,7 @@ When invoked interactively, prints the value in the echo area. char * egetenv (const char *var) { + /* This cannot GC -- 7-28-00 ben */ Bufbyte *value; Bytecount valuelen;