Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/callproc.c Mon Aug 13 10:57:07 2007 +0200 +++ b/src/callproc.c Mon Aug 13 10:57:55 2007 +0200 @@ -121,7 +121,8 @@ pHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); if (pHandle == NULL) { - stderr_out ("call_process_cleanup.OpenProcess: pHandle == NULL, GetLastError () = %d, (int)pHandle = %d\n", GetLastError (), (int)pHandle); + warn_when_safe (Qprocess, Qerror, + "OpenProcess returns NULL process handle."); } wait_for_termination (pHandle); #else @@ -302,8 +303,8 @@ CHECK_STRING (args[i]); new_argv[i - 3] = (char *) XSTRING_DATA (args[i]); } - new_argv[nargs - 3] = 0; } + new_argv[max(nargs - 3,1)] = 0; if (NILP (path)) report_file_error ("Searching for program", Fcons (args[0], Qnil));