On Mon, Jan 09, 2006 at 02:22:11PM -0500, Chet Ramey wrote:
> > bash-3.1:
> >
> > $ bash -c 'trap exit SIGPIPE; echo foo' | :
> > bash: line 0: echo: write error: Broken pipe
> > $
> >
> > Is this change in behaviour intentional, or a regression?
>
> It's intentional, and doesn't have anything
On Monday 09 January 2006 11:25, U-DULI2Krzysiek wrote:
> Bash Version: 3.0
> Patch Level: 16
> Release Status: release
>
> Description:
> bash -c time stackdumps. Not Cygwin specific.
bash-3.0 crashes but bash-3.1 does not
-mike
___
Bug-bash mai
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to U-DULI2Krzysiek on 1/9/2006 9:25 AM:
>
> Description:
> bash -c time stackdumps.
This was fixed in bash 3.1. The root cause was an attempt to do a strdup
of NULL, since time was not given any arguments. Also be aware that if
your
> If there is no trap set it doesn't report an error. So is this
> special behaviour only triggered when there is a trap for SIGPIPE in
> place?
It's not `special', except maybe in the sense that catching a signal
rather than letting it terminate the process causes writes to return
errors.
Chet
> Machine Type: i686-pc-cygwin
>
> Bash Version: 3.0
> Patch Level: 16
> Release Status: release
>
> Description:
> bash -c time stackdumps. Not Cygwin specific.
>
> Repeat-By:
> bash -c time
This was fixed in bash-3.1.
--
``The lyf so short, the craft so long to lerne.'' - Chauce
> Item: No environment variable or other easy means is currently
> available to pass the complete command line to daughter scripts and
> programs.
$BASH_COMMAND seems the closest thing to what you want.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere
Chet Ramey <[EMAIL PROTECTED]> wrote:
> `echo' now displays an error message on write errors.
In the case of a SIGPIPE trap, is it intended that echo sees EPIPE
before the SIGPIPE handler runs?
paul
___
Bug-bash mailing list
Bug-bash@gnu.org
http://l
> Chet Ramey <[EMAIL PROTECTED]> wrote:
> > `echo' now displays an error message on write errors.
>
> In the case of a SIGPIPE trap, is it intended that echo sees EPIPE
> before the SIGPIPE handler runs?
Yes. POSIX requires that trap handling be deferred until a `foreground
utility' completes, a
Solution would seem to be use $BASH_COMMAND as Chet Baker pointed out
to me off-list (thanks), except that my shell is too old.
This is a version 3.0+ feature. Mac OSX ships with 2.05b, so I'm now
looking into what it takes to update the shell.
Grant
Grant Jacobs wrote:
Thanks for your