site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=gqhspmefHEpO9LM9w8icvgsZnpgrF/SwsQlDVf95H3E=; b=slO0cXtjqTFk6X8uKENDNT/Oo2uTplUMtKXya81iY/xV/tYL71VUAacXcsYw37+USD WXlqy8ECY6CX1UD5bz/X9etP8h84e7Rygp/WKV1GRMz6N20P3M1f2KKyX4KV/w8cGxwR tB7H+1vzngAjs0IC3l+oJ0Yf3ush+a2Q/LOyY= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=FRNiUxcDOpPP2gYp8/aaRDwjR1E85Dp4PLQAEgdHOg/7B7cBkf2tKl698l+scZP+Po oJFOALdYoafii7T0A1qtdrWEkHy1a0u8UsQ74ZJXX4UTlYyvMR7dYjWrWyU99t/cKj99 Usc2tC/Tzh9/r2ZCfe4Smb6EGm3m1BtvJhaF8= 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. <agentm@themactionfaction.com> 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Rakesh Singhal