home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5374 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  1.4 KB

  1. Xref: sparky comp.unix.programmer:5374 comp.lang.c:16873
  2. Newsgroups: comp.unix.programmer,comp.lang.c
  3. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!news.duc.auburn.edu!peking!swanger
  4. From: swanger@accs.duc.auburn.edu (David Swanger)
  5. Subject: Re: How do you shell out of a C program
  6. Message-ID: <1992Nov20.134059.26971@news.duc.auburn.edu>
  7. Sender: usenet@news.duc.auburn.edu (News Account)
  8. Nntp-Posting-Host: peking.duc.auburn.edu
  9. Reply-To: swanger@accs.duc.auburn.edu
  10. Organization: Academic Computing Services, Auburn University, AL
  11. References: <1992Nov19.214220.2817@news.duc.auburn.edu>
  12. Date: Fri, 20 Nov 1992 13:40:59 GMT
  13. Lines: 28
  14.  
  15.  
  16. #From swanger@accs.duc.auburn.edu (David Swanger)
  17.  
  18. #I am writing a C program for my SUN IPC Workstation, SunOs 4.1.2,
  19. #and would like to be able to shell in and out of the program.  My
  20. #program uses curses (Sys V).  I tried the following command:
  21.  
  22. #system("/bin/csh");
  23.  
  24. #When the program reached this point, it seemed to shell out (I saw
  25. #the prompt), but the terminal froze up.  Obviously I am missing
  26. #something with either C or curses or system() or something.  I
  27. #would really appreciate some help with this.
  28.  
  29. Ok, ok, I broke down and reread the curses man pages and I discovered
  30. that the following seems to work:
  31.  
  32.   endwin();
  33.   system("/bin/csh");
  34.   doupdate();
  35.  
  36. Thanks to all of the people who sent help with this.
  37.  
  38. David Swanger
  39. Academic Computing Services
  40. Auburn University, AL
  41. swanger@accs.duc.auburn.edu
  42.  
  43.