home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!think.com!yale.edu!nigel.msen.com!math.fu-berlin.de!informatik.tu-muenchen.de!mayerh
- From: mayerh@lpr.e-technik.tu-muenchen.de (Herbert Mayer)
- Subject: Problems with job control
- Keywords: job control
- Sender: news@Informatik.TU-Muenchen.DE (USENET Newssystem)
- Organization: Lehrstuhl f. Prozessrechner, Techn. Univ. Muenchen, Germany
- Date: Thu, 21 Jan 1993 13:47:20 GMT
- Message-ID: <mayerh.727624040@lpr.lpr.e-technik.tu-muenchen.de>
- Summary: problems with job control
- Lines: 24
-
-
- I have problems with job control on AIX.
-
- I'm writing a turorial-program for UNIX.
- In this programm the user has the possibility to do an exercise in a shell.
- This shell will be created from the program with a fork() and an exec() command.After the exercise the tutorial-program should be continued.
- For the shell exists a time limit. If the user doesn't exit the shell before
- the time is over, the program has to kill the shell.
- In order to kill all processes, that are running on this shell, it is necessary
- to assign it to an own processgroup and kill the whole group at the time limit.
- With a tcsetpgrp() command in the tutorial-program it is possible to put the
- processgroup of the shell in the foreground and the tutorial-programm in the
- background. Because the tcsetpgrp() command only works in a process who is in
- foreground, I can't get the tutorial-program back to the foreground after the
- shell was killed.
- Exactly this is my problem.
-
- Please e-mail your answer to mayerh@lpr.lpr.e-technik.tu-muenchen.de
-
-
- Thanks in advance
-
- Herbert
-
-