From patchwork Thu Jan 21 13:40:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SMODwqVrb24gQnVnZ2U=?= X-Patchwork-Id: 74338 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0LDf005015673 for ; Thu, 21 Jan 2010 13:41:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751954Ab0AUNk7 (ORCPT ); Thu, 21 Jan 2010 08:40:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751636Ab0AUNk7 (ORCPT ); Thu, 21 Jan 2010 08:40:59 -0500 Received: from gmp-eb-inf-1.sun.com ([192.18.6.21]:47560 "EHLO gmp-eb-inf-1.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751385Ab0AUNk6 (ORCPT ); Thu, 21 Jan 2010 08:40:58 -0500 Received: from fe-emea-10.sun.com (gmp-eb-lb-1-fe1.eu.sun.com [192.18.6.7] (may be forged)) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o0LDevPC012509 for ; Thu, 21 Jan 2010 13:40:57 GMT MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) id <0KWL00K00LG2OK00@fe-emea-10.sun.com> for linux-rdma@vger.kernel.org; Thu, 21 Jan 2010 13:40:56 +0000 (GMT) Received: from d-eosl04-138-105.norway.sun.com ([unknown] [129.159.138.105]) by fe-emea-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) with ESMTPSA id <0KWL0060LNBXNUA0@fe-emea-10.sun.com>; Thu, 21 Jan 2010 13:40:46 +0000 (GMT) Date: Thu, 21 Jan 2010 14:40:45 +0100 From: =?iso-8859-1?Q?H=E5kon_Bugge?= Subject: [PATCH] libibverbs: Force line-buffering in ibv_asyncwatch To: Vladimir Sokolovsky Cc: OFED mailing list , Or Gerlitz Message-id: X-Mailer: Apple Mail (2.1077) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/examples/asyncwatch.c b/examples/asyncwatch.c index e56b4dc..f9fe6ff 100644 --- a/examples/asyncwatch.c +++ b/examples/asyncwatch.c @@ -98,6 +98,9 @@ int main(int argc, char *argv[]) return 1; } + /* Force line-buffering if stdout is redirected */ + setlinebuf(stdout); + printf("%s: async event FD %d\n", ibv_get_device_name(*dev_list), context->async_fd);