![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what is meaning of exit(0) and exit(1) | amitpansuria | UNIX for Dummies Questions & Answers | 1 | 08-28-2007 04:02 AM |
| exit 2 | xramm | Shell Programming and Scripting | 2 | 08-15-2007 10:48 AM |
| exit(0) versus exit(1) | enuenu | High Level Programming | 9 | 06-22-2007 11:56 AM |
| Where can I find a list of exit codes? (Exit code 64) | jkuchar747 | UNIX for Dummies Questions & Answers | 3 | 12-07-2004 06:08 PM |
| How to exit ssh | davidg | UNIX for Advanced & Expert Users | 1 | 10-16-2003 08:10 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
ZSH - '.zlogout' not being run on exit
Hi, I have a problem with '.zlogout' not being run on Solaris 10. Here's whats happening. I remotely log in from a PC running Cygwin/X using a local xterm window and ssh to start a remote 'zsh' shell, version 4.2.5, on a Solaris 10 server. The Server has KDE installed but as a Window manager is already running on the PC it cannot start KDE correctly. This does not give me a problem as the first xterm which connects to the server will also start 'kicker', the KDE menu bar, which allows me to access all the KDE programs that I need. I have written a '.zlogout' script which will check to see if there are any 'zsh' sessions remaining. If there are not then it should kill any 'kicker' processes that I own. The problem comes when I log off the server. The '.zlogout' script does not appear to be run leaving the 'kicker' process running. I have run the .'zlogout' script manually from a ksh session after starting 'kicker' and it kills it off correctly, therefore there does not appear to anything wrong with the '.zlogout' script itself. I have set $ZDOTDIR to the directory containing the '.zlogout' script and also placed an 'ls' command with the output re-directed to a file but nothing is being output, which leads me to believe that the '.zlogout' script is not being called. Does anyone has any ideas of what may be wrong ? This is the contents of the '.zlogout' file: Code:
#!/usr/bin/zsh
ls -l > /tmp/t1
xterm_cnt=$( ps -fu $USER | grep -v grep | grep -wc zsh )
if (( ${xterm_cnt} <= 1 )) ; then
pkill -U ${USER} kicker
fi
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|