home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11895 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.2 KB

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