home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!usc!sdd.hp.com!swrinde!mips!decwrl!gossip.pyramid.com!aquila.sni-usa.com!abyss.sni-usa.com!corrado
- From: corrado@abyss.sni-usa.com (Corrado Giacomini)
- Newsgroups: comp.unix.shell
- Subject: How to return a job in foreground from shell script
- Message-ID: <1992Aug12.141629.537@aquila.sni-usa.com>
- Date: 12 Aug 92 14:16:29 GMT
- Sender: news@aquila.sni-usa.com (news USE only)
- Reply-To: corrado@abyss.sni-usa.com (Corrado Giacomini)
- Organization: Siemens-Nixdorf Information Systems, Inc. Cambridge, MA
- Lines: 19
- Nntp-Posting-Host: abyss.sni-usa.com
-
- I need to write a script which has to put a job in background,
- susped the execution of the job, continue the job execution in
- background, and finally quit it.
- What i tryed is this:
- pgm &
- /bin/ps -e | grep "pgm" | awk '{ print $1 }' | xargs kill -TSTP
- /bin/ps -e | grep "pgm" | awk '{ print $1 }' | xargs kill -CONT
- /bin/ps -e | grep "pgm" | awk '{ print $1 }' | xargs kill -QUIT
-
- but what I got is only a stopped job, the QUIT signal then
- quit the job and produces a core ??
- Is there a way for example to place for example the job in
- foreground from shell script like using fg command ?
-
- -------------------------------------------------
- Corrado Giacomini
- email corrado@sni-usa.com
- giacomin@dnc1.ico.olivetti.com
- -------------------------------------------------
-