[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can not save traps
From: |
Chet Ramey |
Subject: |
Re: can not save traps |
Date: |
Wed, 02 Feb 2005 21:02:31 -0500 |
User-agent: |
Mozilla Thunderbird 1.0 (Macintosh/20041206) |
mwang@unixlabplus.com wrote:
Bash Version: 3.0
Patch Level: 0
Release Status: release
Description:
The POSIX standard says:
-- begin quote --
The trap command with no arguments shall write to standard output a list
of commands associated with each condition. The format shall be:
"trap -- %s %s ...\n", <action>, <condition> ...
The shell shall format the output, including the proper use of quoting,
so that it is suitable for reinput to the shell as commands that achieve
the same trapping results. For example:
save_traps=$(trap)
...
eval "$save_traps"
-- end quote --
This is not happening in bash-3.00:
Thanks, this has been fixed. You'll notice that this happens only with
the exit trap.
Chet
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.CWRU.Edu
http://cnswww.cns.cwru.edu/~chet/