home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / msdos / programm / 11731 < prev    next >
Encoding:
Text File  |  1993-01-01  |  2.0 KB  |  44 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!usc!cs.utexas.edu!sun-barr!ames!saimiri.primate.wisc.edu!aplcen.apl.jhu.edu!wb3ffv!msw!wmark
  3. From: wmark@msw (Mark S. Winsor)
  4. Subject: Equivilent of UNIX exec shell cmd
  5. Message-ID: <1992Dec31.142534.15978@msw>
  6. Organization: ProVAR
  7. Date: Thu, 31 Dec 1992 14:25:34 GMT
  8. Lines: 34
  9.  
  10. I'm porting a menu system in C from UNIX that for purposes of memory 
  11. conservation in dos creates a temporary batch file and execvp()'s it
  12. to run whatever option was chosen, then re-executes the menu program
  13. with options that tell it where it was, etc. My problem is that the
  14. temporary batch file is still active while it executes the menu program
  15. and then a new temporary batch file is created and execvp()'d. When you
  16. exit out if the menu system, it goes back into it again for the number
  17. of times that the batch file was executed. An illustration below:
  18.  
  19. +---------+          +---------+
  20. |  Menu   |     ---->|  Menu   |     Batch1 is still active when menu
  21. +---------+     |    +---------+     execvp()'s batch2.
  22.     \/          |        \/
  23.     \/          |        \/
  24. +---------+     |    +---------+     Example of batch1:
  25. |  Batch1 |------    |  Batch2 |     ECHO OFF
  26. +---------+          +---------+     COMMAND.COM
  27.                                      MENU /F
  28.  
  29. The equivilent of the UNIX shell exec in front of the MENU command is
  30. what I need, does something like this exist? Forgive my ignorance of
  31. MS-DOS.
  32.  
  33. -- 
  34.                                 __                
  35. email: wmark@wb3ffv.ampr.org   '  )--,--,          /       Mark S. Winsor 
  36.                                  /  /  / __.  __  /__,     Systems Analyst
  37. #include <stddisclaimer.h>      /  /  (_(_/|_/ (_/ \_      ProVAR, Inc.
  38.  
  39. -- 
  40.                                 __                
  41. email: wmark@wb3ffv.ampr.org   '  )--,--,          /       Mark S. Winsor 
  42.                                  /  /  / __.  __  /__,     Systems Analyst
  43. #include <stddisclaimer.h>      /  /  (_(_/|_/ (_/ \_      ProVAR, Inc.
  44.