delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/23/23:26:30

Date: Tue, 23 Sep 1997 20:24:38 -0700 (PDT)
Message-Id: <199709240324.UAA02120@adit.ap.net>
Mime-Version: 1.0
To: triquet AT fil DOT univ-lille1 DOT fr, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: relocating and launching a program

At 02:52  9/22/1997 GMT, triquet frederic wrote:
>Hi there,
>I would like to know whether it is possible (if yes then how,if
>no then why) to load a program in memory, relocate it, run it
>and then go on with the first prog (just as a function call).
Huh? I don't understand what you mean by relocate. All the other stuff works
just fine.
>
>I presently use 'system("my_prog.exe");' but I would like to
>call an extern prog in an other way.
Is there something wrong with system()?  The other option is spawn*(), read
about it in the libc docs.

spawnlp(P_WAIT,"my_prog.exe","my_prog.exe" /* , other args */);

>
>Last, is it possible if "my_prog.exe" is a real-mode prog ?
Yes. No changes are needed.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019