comparison src/process-unix.c @ 321:19dcec799385 r21-0-58

Import from CVS: tag r21-0-58
author cvs
date Mon, 13 Aug 2007 10:46:44 +0200
parents 512e409c26a2
children 7347b34c275b
comparison
equal deleted inserted replaced
320:73c75c43c1f2 321:19dcec799385
733 733
734 inchannel = outchannel = forkin = forkout = -1; 734 inchannel = outchannel = forkin = forkout = -1;
735 735
736 /* Nothing below here GCs so our string pointers shouldn't move. */ 736 /* Nothing below here GCs so our string pointers shouldn't move. */
737 new_argv = alloca_array (char *, nargv + 2); 737 new_argv = alloca_array (char *, nargv + 2);
738 new_argv[0] = (char *) XSTRING_DATA (program); 738 GET_C_STRING_FILENAME_DATA_ALLOCA (program, new_argv[0]);
739 for (i = 0; i < nargv; i++) 739 for (i = 0; i < nargv; i++)
740 { 740 {
741 Lisp_Object tem = argv[i]; 741 Lisp_Object tem = argv[i];
742 CHECK_STRING (tem); 742 CHECK_STRING (tem);
743 new_argv[i + 1] = (char *) XSTRING_DATA (tem); 743 new_argv[i + 1] = (char *) XSTRING_DATA (tem);
744 } 744 }
745 new_argv[i + 1] = 0; 745 new_argv[i + 1] = 0;
746 current_dir = (char *) XSTRING_DATA (cur_dir); 746 GET_C_STRING_FILENAME_DATA_ALLOCA (cur_dir, current_dir);
747 747
748 #ifdef HAVE_PTYS 748 #ifdef HAVE_PTYS
749 if (!NILP (Vprocess_connection_type)) 749 if (!NILP (Vprocess_connection_type))
750 { 750 {
751 /* find a new pty, open the master side, return the opened 751 /* find a new pty, open the master side, return the opened
1196 } 1196 }
1197 } 1197 }
1198 else 1198 else
1199 { /* We got here from a longjmp() from the SIGPIPE handler */ 1199 { /* We got here from a longjmp() from the SIGPIPE handler */
1200 signal (SIGPIPE, old_sigpipe); 1200 signal (SIGPIPE, old_sigpipe);
1201 /* Close the file lstream so we don't attempt to write to it further */
1202 /* #### There is controversy over whether this might cause fd leakage */
1203 /* my tests say no. -slb */
1204 XLSTREAM (p->pipe_outstream)->flags &= ~LSTREAM_FL_IS_OPEN;
1201 p->status_symbol = Qexit; 1205 p->status_symbol = Qexit;
1202 p->exit_code = 256; /* #### SIGPIPE ??? */ 1206 p->exit_code = 256; /* #### SIGPIPE ??? */
1203 p->core_dumped = 0; 1207 p->core_dumped = 0;
1204 p->tick++; 1208 p->tick++;
1205 process_tick++; 1209 process_tick++;