Mercurial > hg > xemacs-beta
comparison src/ntproc.c @ 124:9b50b4588a93 r20-1b15
Import from CVS: tag r20-1b15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:26:39 +0200 |
parents | 4be1180a9e89 |
children | 41ff10fd062f |
comparison
equal
deleted
inserted
replaced
123:c77884c6318d | 124:9b50b4588a93 |
---|---|
584 char *cmdline, *env, *parg, **targ; | 584 char *cmdline, *env, *parg, **targ; |
585 int arglen; | 585 int arglen; |
586 int pid; | 586 int pid; |
587 child_process *cp; | 587 child_process *cp; |
588 int is_dos_binary; | 588 int is_dos_binary; |
589 | 589 struct gcpro gcpro1; |
590 | |
590 /* We don't care about the other modes */ | 591 /* We don't care about the other modes */ |
591 if (mode != _P_NOWAIT) | 592 if (mode != _P_NOWAIT) |
592 { | 593 { |
593 errno = EINVAL; | 594 errno = EINVAL; |
594 return -1; | 595 return -1; |
595 } | 596 } |
596 | 597 |
597 /* Handle executable names without an executable suffix. */ | 598 /* Handle executable names without an executable suffix. */ |
598 program = make_string (cmdname, strlen (cmdname)); | 599 program = make_string (cmdname, strlen (cmdname)); |
600 GCPRO1 (program); | |
599 if (NILP (Ffile_executable_p (program))) | 601 if (NILP (Ffile_executable_p (program))) |
600 { | 602 { |
601 struct gcpro gcpro1; | |
602 | |
603 full = Qnil; | 603 full = Qnil; |
604 GCPRO1 (program); | |
605 locate_file (Vexec_path, program, EXEC_SUFFIXES, &full, 1); | 604 locate_file (Vexec_path, program, EXEC_SUFFIXES, &full, 1); |
606 UNGCPRO; | |
607 if (NILP (full)) | 605 if (NILP (full)) |
608 { | 606 { |
607 UNGCPRO; | |
609 errno = EINVAL; | 608 errno = EINVAL; |
610 return -1; | 609 return -1; |
611 } | 610 } |
612 cmdname = XSTRING (full)->_data; | 611 cmdname = XSTRING (full)->_data; |
613 argv[0] = cmdname; | 612 argv[0] = cmdname; |
614 } | 613 } |
614 UNGCPRO; | |
615 | |
615 | 616 |
616 /* make sure cmdname is in DOS format */ | 617 /* make sure cmdname is in DOS format */ |
617 strcpy (cmdname = alloca (strlen (cmdname) + 1), argv[0]); | 618 strcpy (cmdname = alloca (strlen (cmdname) + 1), argv[0]); |
618 unixtodos_filename (cmdname); | 619 unixtodos_filename (cmdname); |
619 argv[0] = cmdname; | 620 argv[0] = cmdname; |