Article View: comp.os.msdos.programmer
Article #7519Re: question on spawning DOS from C prog
From: Roy M. Silvernail
Date: Thu, 07 Jan 1993 18:16
Date: Thu, 07 Jan 1993 18:16
24 lines
1285 bytes
1285 bytes
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
Technical Details
Message-ID:
<o0q1wB2w165w@cybrspc.uucp>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!cybrspc!royReferences:
<1iedifINNmoi@infoac.rmi.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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