No subject



Mon Sep 29 16:05:08 2003
Return-Path: xorp-cvs-admin@icir.org
Delivery-Date: Mon, 29 Sep 2003 16:06:06 -0700
Received: from wyvern.icir.org (wyvern.icir.org [192.150.187.14])
	by tigger.icir.org (8.12.9p1/8.12.3) with ESMTP id h8TN65fw020368
	for <atanu@tigger.icir.org>; Mon, 29 Sep 2003 16:06:05 -0700 (PDT)
	(envelope-from xorp-cvs-admin@icir.org)
Received: from fruitcake.ICSI.Berkeley.EDU (fruitcake.ICSI.Berkeley.EDU [192.150.186.11])
	by wyvern.icir.org (8.12.9p1/8.12.3) with ESMTP id h8TN61H5044630;
	Mon, 29 Sep 2003 16:06:01 -0700 (PDT)
	(envelope-from xorp-cvs-admin@icir.org)
Received: from fruitcake.ICSI.Berkeley.EDU (localhost [127.0.0.1])
	by fruitcake.ICSI.Berkeley.EDU (8.12.9/8.12.9) with ESMTP id h8TN61wG007572;
	Mon, 29 Sep 2003 16:06:01 -0700 (PDT)
Received: from wyvern.icir.org (wyvern.icir.org [192.150.187.14])
	by fruitcake.ICSI.Berkeley.EDU (8.12.9/8.12.9) with ESMTP id h8TN59wG007536
	for <xorp-cvs@icsi.berkeley.edu>; Mon, 29 Sep 2003 16:05:09 -0700 (PDT)
Received: from possum.icir.org (possum.icir.org [192.150.187.67])
	by wyvern.icir.org (8.12.9p1/8.12.3) with ESMTP id h8TN58H5044622;
	Mon, 29 Sep 2003 16:05:08 -0700 (PDT)
	(envelope-from pavlin@possum.icir.org)
Received: from possum.icir.org (localhost [127.0.0.1])
	by possum.icir.org (8.12.9p1/8.12.3) with ESMTP id h8TN58IK072251;
	Mon, 29 Sep 2003 16:05:08 -0700 (PDT)
	(envelope-from pavlin@possum.icir.org)
Message-Id: <200309292305.h8TN58IK072251@possum.icir.org>
To: Orion Hodson <hodson@icir.org>
cc: Pavlin Radoslavov <pavlin@icir.org>, xorp-cvs@icir.org
Subject: Re: [Xorp-cvs] XORP cvs commit: xorp/libxorp/ selector.cc 
In-Reply-To: Message from Orion Hodson <hodson@icir.org> 
   of "Mon, 29 Sep 2003 13:31:04 PDT." <200309292031.h8TKV4Cu090555@puma.icir.org> 
Date: Mon, 29 Sep 2003 16:05:08 -0700
From: Pavlin Radoslavov <pavlin@icir.org>
Sender: xorp-cvs-admin@icir.org
Errors-To: xorp-cvs-admin@icir.org
X-BeenThere: xorp-cvs@icir.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:xorp-cvs-request@icir.org?subject=help>
List-Post: <mailto:xorp-cvs@icir.org>
List-Subscribe: <http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs>,
	<mailto:xorp-cvs-request@icir.org?subject=subscribe>
List-Id: Mailing list for XORP CVS commit messages <xorp-cvs.icir.org>
List-Unsubscribe: <http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs>,
	<mailto:xorp-cvs-request@icir.org?subject=unsubscribe>

> | I appreciate that you found and fixed the select() restarting
> | problem, 
> | but now when I press Ctrl-C, there is a "select failed"
> | error message that is not needed:
> | 
> | pavlin@possum[532] ./xorp_finder 
> | ^CSIGINT received. Exiting.
> | [ 2003/09/29 12:25:56  ERROR xorp_finder:58186 LIBXORP +228 selector.cc selec
> | t ] SelectorList::select failed: Interrupted system call
> | 
> | The solution for this is just not to print XLOG_ERROR() in case of
> | EINTR (see patch below).
> 
> The error message tells signal generator that the process was blocked before the interrupt was received, ie they can see the process was wedged somewhere.  For the rare occasions this information might be useful I'd be inclined to leave things as they are.

EINTR is a special case. It is normal for a program to receive
interrupts. If the program handles those interrupts, and then
returns to select(), you don't want the program to print
an error message simply because there is no error here.
If you are debugging a problem and you want to track the case when
select() is interrupted, then just add debug_msg() there.
Using XLOG_ERROR() in case of EINTR is very misleading.

Pavlin
_______________________________________________
Xorp-cvs mailing list
Xorp-cvs@icir.org
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs