Mail Archives: djgpp/2014/05/11/14:36:18
> From: "Rod Pemberton" <dont_use_email AT xnothavet DOT cqm>
> Date: Sun, 11 May 2014 13:59:32 -0400
>
> I have a process which spawns a child of itself via system().
>
> Although the parent and child are the same application, I'd now
> like the child to function slightly differently from the parent.
> To do that, I need to be able to detect that the child is not
> the parent. How is that usually done in DJGPP or DOS?
Does the argument passed to 'system' use anything that would need to
invoke the child via command.com? If not, you should be able to see
the " !proxy" variable in the environment of the child. Also, if the
original command line (in the PSP) starts with "!proxy ", that's also
a sign that it was invoked by a DJGPP parent.
- Raw text -