Re: broken pipe
Re: broken pipe
- Subject: Re: broken pipe
- From: Rakesh Singhal <email@hidden>
- Date: Wed, 18 Feb 2009 08:58:04 +0530
Thanks M. Yes, you are right. I am first checking using select(), that
can app write to port or not then only I am writing to
port(descriptor). But before that I was getting SIGPIPE signal few
times, and now I am getting once after half an hour or 45 min. But the
thing is that still I am getting it. So may be there is one more
reason for this signal? I am getting this signal in main thread.
Is there anyway to track this signal to know the cause of this?
Regards
rksinghal
On Wed, Feb 18, 2009 at 1:59 AM, A.M. <email@hidden> wrote:
>
> On Feb 17, 2009, at 2:06 PM, Rakesh Singhal wrote:
>
>> Hi all,
>>
>> I am getting SIGPIPE (broken pipe) signal. I have implemented signal
>> handler.
>>
>> I do not know, why I am getting it in my app. I do not have any
>> sockets in my app. I am communicating with serial port and my own
>> dynamic libraries. How can I find the cause of this signal? Please
>> suggest.
>
>
> You are writing to descriptor which has nothing on the other side (reading).
> You should ignore the SIGPIPE signal on all threads and check for
> errno==EPIPE instead.
>
> http://www.opengroup.org/onlinepubs/9699919799/functions/write.html
> [EPIPE] An attempt is made to write to a pipe or FIFO that is not open for
> reading by any process, or that only has one end open. A SIGPIPE signal
> shall also be sent to the thread.
>
> Cheers,
> M
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >broken pipe (From: Rakesh Singhal <email@hidden>) |