home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / msdos / programm / 11842 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.5 KB  |  52 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!tim.src.utah.edu!tim
  3. From: tim@tim.src.utah.edu (Tim Ma)
  4. Subject: Re: question on spawning DOS from C prog
  5. Message-ID: <tim.36.726368023@tim.src.utah.edu>
  6. Lines: 40
  7. Sender: news@fcom.cc.utah.edu
  8. Organization: University of Utah
  9. References: <1993Jan5.212229.57639@ns1.cc.lehigh.edu> <1iedifINNmoi@infoac.rmi.de>
  10. Date: Thu, 7 Jan 1993 00:53:43 GMT
  11.  
  12. >Subject: Re: question on spawning DOS from C prog
  13. >Date: 6 Jan 93 10:50:55 GMT
  14. >jmt7@ns1.cc.lehigh.edu (JOHN M. TROIANO) writes:
  15. >
  16. >>For example, after spawning DOS the user would
  17. >>see:
  18. >>            <Type EXIT to return to program>      <--this would appear
  19. >>                                                     each time <RET> hit
  20. >>            C:\
  21. >>    Is there, perhaps, a parameter to COMMAND.COM to do this?
  22.  
  23. Reply was:
  24. ------------------------------------------------------------------------
  25. >In your function declare something like:
  26. >
  27. >    static char prompt[]="PROMPT=<Type EXIT to return to program>$_$_$P";
  28. >
  29. >and before the spawnl() do a
  30. >
  31. >    putenv(prompt);
  32. >
  33. >to get exactly what you want.
  34. >
  35. >Greetings,
  36. >Wolfgang
  37. >--
  38. >siebeck@infoac.rmi.de (Wolfgang Siebeck)
  39.  
  40. Is this possible?  It was my understanding that 'spawn' called a new command 
  41. shell so any changes in the environment would not be carried over.
  42.  
  43. I've always used 'spawnl' with the 'e' suffix to set or pass on environment 
  44. variables.
  45.  
  46. Curiously,
  47.  
  48. Tim Ma
  49. Associate Programmer
  50. University of Utah
  51. Email:  tim@src.cppa.utah.edu
  52.