home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!usc!cs.utexas.edu!sun-barr!ames!saimiri.primate.wisc.edu!aplcen.apl.jhu.edu!wb3ffv!msw!wmark
- From: wmark@msw (Mark S. Winsor)
- Subject: Equivilent of UNIX exec shell cmd
- Message-ID: <1992Dec31.142534.15978@msw>
- Organization: ProVAR
- Date: Thu, 31 Dec 1992 14:25:34 GMT
- Lines: 34
-
- I'm porting a menu system in C from UNIX that for purposes of memory
- conservation in dos creates a temporary batch file and execvp()'s it
- to run whatever option was chosen, then re-executes the menu program
- with options that tell it where it was, etc. My problem is that the
- temporary batch file is still active while it executes the menu program
- and then a new temporary batch file is created and execvp()'d. When you
- exit out if the menu system, it goes back into it again for the number
- of times that the batch file was executed. An illustration below:
-
- +---------+ +---------+
- | Menu | ---->| Menu | Batch1 is still active when menu
- +---------+ | +---------+ execvp()'s batch2.
- \/ | \/
- \/ | \/
- +---------+ | +---------+ Example of batch1:
- | Batch1 |------ | Batch2 | ECHO OFF
- +---------+ +---------+ COMMAND.COM
- MENU /F
-
- The equivilent of the UNIX shell exec in front of the MENU command is
- what I need, does something like this exist? Forgive my ignorance of
- MS-DOS.
-
- --
- __
- email: wmark@wb3ffv.ampr.org ' )--,--, / Mark S. Winsor
- / / / __. __ /__, Systems Analyst
- #include <stddisclaimer.h> / / (_(_/|_/ (_/ \_ ProVAR, Inc.
-
- --
- __
- email: wmark@wb3ffv.ampr.org ' )--,--, / Mark S. Winsor
- / / / __. __ /__, Systems Analyst
- #include <stddisclaimer.h> / / (_(_/|_/ (_/ \_ ProVAR, Inc.
-