www.delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <20020713021352.13301.qmail@email.com> |
MIME-Version: | 1.0 |
From: | "Shane Brooks" <shane_brooks AT email DOT com> |
To: | cygwin AT cygwin DOT com |
Date: | Fri, 12 Jul 2002 21:13:52 -0500 |
Subject: | Re: close cygwin window - bash doesnt save history |
X-Originating-Ip: | 210.49.181.26 |
X-Originating-Server: | ws3-1.us4.outblaze.com |
From: Randall R Schulz <rrschulz AT cris DOT com> > (*) In further investigating options using "trap," I discovered I can no > longer repeat my earlier success, regardless of whether I use "tty" or not. I used "history -a" , but it appears the trap is being called when the window closes as I can call "myclosefn" OK. I have been typing this at the BASH command prompt, not editing a .bash_login or profile. So my session looks like.. Shane AT GUINNESS ~ $ myclose () { > history -a > } Shane AT GUINNESS ~ $ trap myclosefn SIGHUP Shane AT GUINNESS ~ $ using shopt I see that the builtin command huponexit is OFF, but that should be OK shouldnt it? the man page suggests huponexit allows tasks that are not in the job table to recieve the SIGHUP also. from the man page "When Bash receives a signal for which a trap has been set while waiting for a command to complete, the trap will not be executed until the command completes." - perhaps under windows its too late once the command has completed? ie the window is already closed? Interestingly I see something flash onto the command line just before the window closes..but my machine is too fast to allow me to read it. -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Save up to $160 by signing up for NetZero Platinum Internet service. http://www.netzero.net/?refcd=N2P0602NEP8 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |