home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!umn.edu!cybrspc!roy
- From: roy%cybrspc@cs.umn.edu (Roy M. Silvernail)
- Newsgroups: comp.os.msdos.programmer
- Subject: Re: question on spawning DOS from C prog
- Message-ID: <o0q1wB2w165w@cybrspc.uucp>
- Date: Thu, 07 Jan 93 12:16:11 CST
- References: <1iedifINNmoi@infoac.rmi.de>
- Organization: Villa CyberSpace, Minneapolis, MN
- Lines: 24
-
- siebeck@infoac.rmi.de (Wolfgang Siebeck) writes:
-
- > In your function declare something like:
- >
- > static char prompt[]="PROMPT=<Type EXIT to return to program>$_$_$P";
- >
- > and before the spawnl() do a
- >
- > putenv(prompt);
- >
- > to get exactly what you want.
-
- This will, of course, require that you have spare room in your
- environment block. Applications are passed a _copy_ of the environment
- by command.com, which has all spare space trimmed off. Thus, the
- putenv() call may very well fail.
-
- 4dos can pass extra environment space explicitly, or you can construct
- an environment array for the child program and pass it with a spawnlpe()
- or similar call.
- --
- Roy M. Silvernail -- [my machine ] "Sometimes, you're the windshield....
- roy%cybrspc@cs.umn.edu [my opinions] sometimes, you're the bug!"
- cybrspc!roy@cs.umn.edu [my $0.0275 ] --Mark Knopfler
-