public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Shane Brooks" <shane_brooks@email.com>
To: cygwin@cygwin.com
Subject: Re: close cygwin window - bash doesnt save history
Date: Sat, 13 Jul 2002 07:05:00 -0000	[thread overview]
Message-ID: <20020713021352.13301.qmail@email.com> (raw)

From: Randall R Schulz <rrschulz@cris.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@GUINNESS ~
$ myclose () {
> history -a
> }

Shane@GUINNESS ~
$ trap myclosefn SIGHUP

Shane@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/

             reply	other threads:[~2002-07-13  2:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13  7:05 Shane Brooks [this message]
2002-07-13  7:11 ` Randall R Schulz
  -- strict thread matches above, loose matches on Subject: below --
2002-07-13  5:45 Shane Brooks
2002-07-13 10:16 ` Dario Alcocer
2002-07-11  5:10 Schaible, Jorg
2002-07-11  3:30 Shane Brooks
2002-07-11  9:10 ` Dario Alcocer
2002-07-11  9:11 ` Randall R Schulz
2002-07-11  9:29   ` Dario Alcocer
2002-07-11 10:27     ` Randall R Schulz
2002-07-10  7:18 Barry Buchbinder
2002-07-10  9:03 ` Dario Alcocer
2002-07-10  5:35 Shane Brooks

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=20020713021352.13301.qmail@email.com \
    --to=shane_brooks@email.com \
    --cc=cygwin@cygwin.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).