chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Re: with-open-pipe to handle sigpipe


From: Alan Post
Subject: Re: [Chicken-users] Re: with-open-pipe to handle sigpipe
Date: Tue, 15 Apr 2008 17:07:23 -0600

On Tue, Apr 15, 2008 at 04:02:10PM -0700, Lui Fungsin wrote:
> OK, so the problem is that sigpipe is not handled.
> 
> Does the following code look reasonable?
> 
> Specifically, I'm not sure if escaping with the continuation k is the
> proper way to gracefully handle the signal.
> 
> Thanks.
> 

If you set SIGPIPE to the chicken equivalent of SIG_IGN, any error
message writing to the pipe will be returned by write(2) instead,
which you could then handle in an exception handler on your primary
stack, instead of the signal stack.

-Alan
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]