From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-2.0 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.kgio.general Subject: Re: kgio, autopush test fails on Debian GNU/kFreeBSD Date: Mon, 5 Mar 2012 08:43:23 +0000 Message-ID: <20120305084323.GA18294@dcvr.yhbt.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1330937031 26688 80.91.229.3 (5 Mar 2012 08:43:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Mar 2012 08:43:51 +0000 (UTC) To: kgio@librelist.org Original-X-From: kgio@librelist.org Mon Mar 05 09:43:50 2012 Return-path: Envelope-to: gclrkg-kgio@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: kgio@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.kgio.general:88 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S4TWE-0002yv-1f for gclrkg-kgio@m.gmane.org; Mon, 05 Mar 2012 09:43:46 +0100 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 7564121D079 for ; Mon, 5 Mar 2012 08:49:33 +0000 (UTC) 375gnu <375gnu@gmail.com> wrote: > I know that it's an exotic system, but anyway. > > In the last assertion getsockopt returns 0. May be it's good behavior for > GNU/kFreeBSD, I don't know. I think this problem is partially caused by eglibc/glibc failing to define TCP_NOPUSH in the headers. I can probably workaround it with with something like: #if defined(__GLIBC__) && defined(__FreeBSD_kernel__) && !defined(TCP_NOPUSH) # define TCP_NOPUSH 4 #endif in ext/kgio/autopush.c If it works, we should report this to the Debian eglibc folks. > def test_autopush_accessors > Kgio.autopush = true > opt = RUBY_PLATFORM =~ /freebsd/ ? TCP_NOPUSH : TCP_CORK And I suspect RUBY_PLATFORM is "gnu/kfreebsd" or something and matches :x I'll try to get this working on GNU/kFreeBSD this week if you don't beat me to it. It'd probably be a good idea to just add a Kgio.autopush_capable? method to the API, to avoid problems like this in the future, too...