From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,400599f96e15af9b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-31 17:20:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.columbus.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D715DBF.C8CF006A@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT: Setting SIGPIPE to SIG_IGN References: <87ofbj5q0r.fsf@deneb.enyo.de> <3D71318A.10909@cogeco.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sun, 01 Sep 2002 00:20:55 GMT NNTP-Posting-Host: 66.75.148.61 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1030839655 66.75.148.61 (Sat, 31 Aug 2002 17:20:55 PDT) NNTP-Posting-Date: Sat, 31 Aug 2002 17:20:55 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:28639 Date: 2002-09-01T00:20:55+00:00 List-Id: "Warren W. Gay VE3WWG" wrote: > > Florian Weimer wrote: > > I want to instruct the GNAT run-time library that it sets the SIGPIPE > > handler to SIG_IGN, so that system calls such as read() return EPIPE > > instead of delivering a signal. > > Actually, I think you mean that read(2) returns EINTR (or EAGAIN > on some platforms). EPIPE is returned when you write to a > pipe without a reader. If you read from a pipe whose other end has been closed, I'm pretty sure you always get EOF, yes? Of course, if you get a different signal while blocked on the pipe, you of course get the same signal you'd get from any blocking operation that gets interruped by a signal. It's writing to a broken pipe that raises SIGPIPE, and that's only because of the funky way that UNIX shells cause signals to be delivered to processes. (Basically, the original V7 shells wound up having the last process of a pipeline being the direct child, and the shell passed signals on to it, so it died, and the other processes in the pipeline died as they tried to write to the broken pipe. Obviated by the invention of control terminals.) -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://images.fbrtech.com/dnew/ ** Try our EbolaBurgers... So tender they melt in your mouth.