home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / programm / 6016 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.5 KB  |  37 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!think.com!yale.edu!nigel.msen.com!math.fu-berlin.de!informatik.tu-muenchen.de!mayerh
  3. From: mayerh@lpr.e-technik.tu-muenchen.de (Herbert Mayer)
  4. Subject: Problems with job control
  5. Keywords: job control
  6. Sender: news@Informatik.TU-Muenchen.DE (USENET Newssystem)
  7. Organization: Lehrstuhl f. Prozessrechner, Techn. Univ. Muenchen, Germany
  8. Date: Thu, 21 Jan 1993 13:47:20 GMT
  9. Message-ID: <mayerh.727624040@lpr.lpr.e-technik.tu-muenchen.de>
  10. Summary: problems with job control
  11. Lines: 24
  12.  
  13.  
  14. I have problems with job control on AIX.
  15.  
  16. I'm writing a turorial-program for UNIX.
  17. In this programm the user has the possibility to do an exercise in a shell.
  18. This shell will be created from the program with a fork() and an exec() command.After the exercise the tutorial-program should be continued.
  19. For the shell exists a time limit. If the user doesn't exit the shell before 
  20. the time is over, the program has to kill the shell.
  21. In order to kill all processes, that are running on this shell, it is necessary
  22. to assign it to an own processgroup and kill the whole group at the time limit.
  23. With a tcsetpgrp() command in the tutorial-program it is possible to put the
  24. processgroup of the shell in the foreground and the tutorial-programm in the
  25. background. Because the tcsetpgrp() command only works in a process who is in
  26. foreground, I can't get the tutorial-program back to the foreground after the 
  27. shell was killed. 
  28. Exactly this is my problem.
  29.  
  30. Please e-mail your answer to mayerh@lpr.lpr.e-technik.tu-muenchen.de
  31.  
  32.  
  33. Thanks in advance
  34.  
  35. Herbert
  36.  
  37.