Message-ID: From: DEMERRE DIETER To: djgpp Mailing List Subject: Re: how to calling to dos commands from program c? Date: Tue, 3 Jul 2001 16:27:31 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C103CC.480B5B00" Reply-To: djgpp AT delorie DOT com This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C103CC.480B5B00 Content-Type: text/plain This message uses a character set that is not supported by the Internet Service. To view the original message content, open the attached message. If the text doesn't display correctly, save the attachment to disk, and then open it using a viewer that can display the original character set. <> ------_=_NextPart_000_01C103CC.480B5B00 Content-Type: text/plain; name="message.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="message.txt" Received: from anthony.siemens.ebp.ii3.b-rail.be (193.210.166.161 = [193.210.166.161]) by bru0001a.siemens.be with SMTP (Microsoft Exchange = Internet Mail Service Version 5.5.2653.13) id NYNPDXWB; Tue, 3 Jul 2001 16:27:26 +0200 Received: from localhost (ddemerre AT localhost) by anthony.siemens.ebp.ii3.b-rail.be (8.9.3/8.9.3/SuSE Linux = 8.9.3-0.1) with ESMTP id QAA21445 for ; Tue, 3 Jul 2001 16:27:32 +0200 X-Authentication-Warning: anthony.siemens.ebp.ii3.b-rail.be: ddemerre = owned process doing -bs Date: Tue, 3 Jul 2001 16:27:31 +0200 (CEST) From: Dieter Demerre X-Sender: Reply-To: Dieter Demerre To: djgpp Mailing List Subject: Re: how to calling to dos commands from program c? In-Reply-To: <9hsfa8$rom$1 AT pepico DOT gva DOT es> Message-ID: = MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=3DX-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 3 Jul 2001, Joaqu=3DEDn Toribio wrote: > how to calling to dos commands from program c? I guess you want to execute a dos-command from within a c-program. For this you can use the system() function note however: << man system =3D2E.. system() does not return until the child process has terminated =3D2E.. -------------- e.g. system("C:\\DOS\\format C:"); you can also use the exec*() functions, but then you should note that the function won't return since: << man exec =3D2E.. A successful call to exec*() does not return because the new program overwrites the calling program =3D2E... -------------- -- Groetjes vanwege... Greetings from... -- -- Dieter Demerre *** ddemerre AT acm DOT org -- -- http://www.angelfire.com/de/ddemerre/ -- -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS/d- s+:++ a-()>-- C+ UH P++(+) L++ E W++ N+ o K? w o V M PS+ PE- Y+ PGP+ t 5? X+ R+> tv+ b+ DI D G e+++ h+> r% z- ------END GEEK CODE BLOCK------ ------_=_NextPart_000_01C103CC.480B5B00--