From: "TjL" <tjlists@bigfoot.com>
To: "Alan Iwi" <iwi@atm.ox.ac.uk>, <zsh-users@math.gatech.edu>
Subject: RE: checking jobs when zsh exits
Date: Fri, 24 Dec 1999 09:37:14 -0500 [thread overview]
Message-ID: <NDBBLILDELLPOPPLAJMLGEOKCDAA.tjlists@bigfoot.com> (raw)
In-Reply-To: <Pine.LNX.3.96.991224121551.28894C-100000@pilau.atm.ox.ac.uk>
Alan
Good suggestion.... I have a hackish way of doing this (below) but it would
be nice if there was a better way.
Also, fyi, the zsh-user@math.gatech.edu address is obsolete...
unfortunately I don't have the new one, but I think you can find it at
www.zsh.org
Here's my hack-script, which I call "jobout" and then have:
alias x='source jobout'
and so when I want to logout I just type 'x' and it tells me if I have any
jobs or not.
TjL
# RHOST is a variable I have setup based on
# who am i |awk '{print $NF}'|tr -d '(|)'
jobsfile=/tmp/jobs.$tty.$USER
/bin/rm -f $jobsfile
jobs -l 1>& $jobsfile
COUNT=`wc -l $jobsfile | awk '{print $1}'`
if [ "$COUNT" != "0" ]
then
echo "This tty has stopped jobs:"
cat $jobsfile
/bin/rm -f $jobsfile
else
KEEPALIVEPID=`awk '{print $3}' $jobsfile`
echo "killing $KEEPALIVEPID"
kill -9 $KEEPALIVEPID
echo "No jobs running"
/bin/rm -f $jobsfile
echo "Logout complete from $HOST, returning to $RHOST"
exit 0
fi
next prev parent reply other threads:[~1999-12-24 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-24 12:48 Alan Iwi
1999-12-24 14:37 ` TjL [this message]
1999-12-24 22:09 ` Peter Stephenson
1999-12-24 15:32 Alan Iwi
1999-12-24 16:48 ` Alan Iwi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=NDBBLILDELLPOPPLAJMLGEOKCDAA.tjlists@bigfoot.com \
--to=tjlists@bigfoot.com \
--cc=iwi@atm.ox.ac.uk \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).