home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5374 comp.lang.c:16873
- Newsgroups: comp.unix.programmer,comp.lang.c
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!news.duc.auburn.edu!peking!swanger
- From: swanger@accs.duc.auburn.edu (David Swanger)
- Subject: Re: How do you shell out of a C program
- Message-ID: <1992Nov20.134059.26971@news.duc.auburn.edu>
- Sender: usenet@news.duc.auburn.edu (News Account)
- Nntp-Posting-Host: peking.duc.auburn.edu
- Reply-To: swanger@accs.duc.auburn.edu
- Organization: Academic Computing Services, Auburn University, AL
- References: <1992Nov19.214220.2817@news.duc.auburn.edu>
- Date: Fri, 20 Nov 1992 13:40:59 GMT
- Lines: 28
-
-
- #From swanger@accs.duc.auburn.edu (David Swanger)
-
- #I am writing a C program for my SUN IPC Workstation, SunOs 4.1.2,
- #and would like to be able to shell in and out of the program. My
- #program uses curses (Sys V). I tried the following command:
-
- #system("/bin/csh");
-
- #When the program reached this point, it seemed to shell out (I saw
- #the prompt), but the terminal froze up. Obviously I am missing
- #something with either C or curses or system() or something. I
- #would really appreciate some help with this.
-
- Ok, ok, I broke down and reread the curses man pages and I discovered
- that the following seems to work:
-
- endwin();
- system("/bin/csh");
- doupdate();
-
- Thanks to all of the people who sent help with this.
-
- David Swanger
- Academic Computing Services
- Auburn University, AL
- swanger@accs.duc.auburn.edu
-
-