git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to get bash to shut up about SIGPIPE?

From
Petr Baudis <pasky@ucw.cz>
Date
May 2, 2005, 23:17 UTC
Message-ID
<20050502231743.GL20818@pasky.ji.cz>
In-Reply-To
<20050430110410.GA25322@lsrfire.ath.cx>

Dear diary, on Sat, Apr 30, 2005 at 01:04:10PM CEST, I got a letter where Rene Scharfe <rene.scharfe@lsrfire.ath.cx> told me that...

Show 20 quoted lines
> On Fri, Apr 29, 2005 at 11:29:22PM -0700, Paul Jackson wrote:
> > Linus replied to pj:
> > > > Code Sample 2:
> > > > ...
> > > Didn't change anything for me. Same thing.
> > 
> > I don't believe you did what I did.
> > 
> > The source code for bash, both 2.x and 3.x versions, clearly displays a
> > simpler error message (no line number or redisplay of your script
> > commands) in the case that you set a trap.  And I tested both shells on
> > a multiprocessor, to verify that they behaved as I expected, running
> > these silly little scripts.
> 
> I don't have a multiprocessor and I see the same.  Are you sure it's SMP
> dependant?
> 
> Your solution (trapping _inside_ the job, too) works for me, btw.  Here's
> a patch for cg-log that reduces the clutter to two "Broken pipe" lines
> (pun not intended).

Could you elaborate on how exactly is it supposed to help? I see identical behaviour with the traps and without them (UP, bash-2.05b).

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Paul JacksonNext: Paul Jackson
Message 21 of 22 in “How to get bash to shut up about SIGPIPE?”
  1. Linus TorvaldsApr 28, 2005
  2. Rene ScharfeApr 28, 2005
  3. Linus TorvaldsApr 28, 2005
  4. Rene ScharfeApr 28, 2005
  5. Ryan AndersonApr 28, 2005
  6. Linus TorvaldsApr 28, 2005
  7. Herbert XuMay 1, 2005
  8. David A. WheelerMay 1, 2005
  9. Paul JacksonMay 2, 2005
  10. David A. WheelerMay 4, 2005
  11. Linus TorvaldsMay 4, 2005
  12. Herbert XuMay 4, 2005
  13. Edgar ToernigApr 28, 2005
  14. Linus TorvaldsApr 28, 2005
  15. Joshua T. CorbinApr 29, 2005
  16. Paul JacksonApr 30, 2005
  17. Linus TorvaldsApr 30, 2005
  18. Paul JacksonApr 30, 2005
  19. Rene ScharfeApr 30, 2005
  20. Paul JacksonMay 2, 2005
  21. Petr BaudisMay 2, 2005
  22. Paul JacksonMay 3, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.