Mercurial > hg > xemacs-beta
comparison src/callproc.c @ 359:8e84bee8ddd0 r21-1-9
Import from CVS: tag r21-1-9
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:57:55 +0200 |
parents | 4711e16a8e49 |
children | 972bbb6d6ca2 |
comparison
equal
deleted
inserted
replaced
358:fed6e0f6a03a | 359:8e84bee8ddd0 |
---|---|
119 | 119 |
120 #ifdef WINDOWSNT | 120 #ifdef WINDOWSNT |
121 pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); | 121 pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); |
122 if (pHandle == NULL) | 122 if (pHandle == NULL) |
123 { | 123 { |
124 stderr_out ("call_process_cleanup.OpenProcess: pHandle == NULL, GetLastError () = %d, (int)pHandle = %d\n", GetLastError (), (int)pHandle); | 124 warn_when_safe (Qprocess, Qerror, |
125 "OpenProcess returns NULL process handle."); | |
125 } | 126 } |
126 wait_for_termination (pHandle); | 127 wait_for_termination (pHandle); |
127 #else | 128 #else |
128 wait_for_termination (pid); | 129 wait_for_termination (pid); |
129 #endif | 130 #endif |
300 for (i = 4; i < nargs; i++) | 301 for (i = 4; i < nargs; i++) |
301 { | 302 { |
302 CHECK_STRING (args[i]); | 303 CHECK_STRING (args[i]); |
303 new_argv[i - 3] = (char *) XSTRING_DATA (args[i]); | 304 new_argv[i - 3] = (char *) XSTRING_DATA (args[i]); |
304 } | 305 } |
305 new_argv[nargs - 3] = 0; | |
306 } | 306 } |
307 new_argv[max(nargs - 3,1)] = 0; | |
307 | 308 |
308 if (NILP (path)) | 309 if (NILP (path)) |
309 report_file_error ("Searching for program", Fcons (args[0], Qnil)); | 310 report_file_error ("Searching for program", Fcons (args[0], Qnil)); |
310 new_argv[0] = (char *) XSTRING_DATA (path); | 311 new_argv[0] = (char *) XSTRING_DATA (path); |
311 | 312 |