execl()'ing batch files in DOS

John Keck keck at nprdc.arpa
Wed Jun 14 04:18:54 AEST 1989


In article <948 at hawkmoon.MN.ORG> det at hawkmoon.MN.ORG (Derek E. Terveer) writes:
>In article <2896 at buengc.BU.EDU>, bph at buengc.BU.EDU (Blair P. Houghton) writes:
>> In article <302 at ohs.UUCP> mday at ohs.UUCP (Matthew T. Day) writes:
>> >Does anybody know if it's possible to execl() a batch file in DOS?  
>
>I have had problems when exec()ing batch files.  It always hung my pc.
>
A batch file is a script which is interpreted by the shell. You exec the shell
specified by environment variable COMSPEC with the name of the file as an arg-
ument.  For COMMAND.COM, use the -C flag.  All of this is done for you by the
system() function. 



More information about the Comp.lang.c mailing list