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: AS14383 205.234.109.0/24 X-Spam-Status: No, score=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: trysetrlimit always raises on Mac OS X Date: Fri, 16 Sep 2011 10:42:09 +0000 Message-ID: <20110916104209.GB26335@dcvr.yhbt.net> References: <2A8DD860-975F-4E13-89D0-77B9AC4106E3@audiobox.fm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1316175971 27394 80.91.229.12 (16 Sep 2011 12:26:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2011 12:26:11 +0000 (UTC) To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Fri Sep 16 14:26:07 2011 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Content-Disposition: inline In-Reply-To: <2A8DD860-975F-4E13-89D0-77B9AC4106E3-3HQ/CcOImoi171pxa8y+qA@public.gmane.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:298 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R4XUc-00080v-Nw for gclrrg-rainbows-talk@m.gmane.org; Fri, 16 Sep 2011 14:26:06 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id D1123121827C; Fri, 16 Sep 2011 08:26:05 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id DA8B61858385 for ; Fri, 16 Sep 2011 06:42:10 -0400 (EDT) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 11F331F458; Fri, 16 Sep 2011 10:42:10 +0000 (UTC) Claudio Poli wrote: > Hello, > I decided to investigate on why rainbows! prints out Invalid argument > - setrlimit on Lion. Rainbows! isn't supported on non-Free operating systems even though it probably works. > It turns out the method trysetrlimit in http_server.rb is trying to > set RLIMIT_NOFILE to the maximum allowed number that it finds through > cur, max = Process.getrlimit(var) > > This +max+ variable holds 9223372036854775807, while 256 is the +cur+ value. OSX is broken here for returning RLIMIT_INFINITY (9223372036854775807). Working around broken things non-Free systems just encourages them to stay broken. If it were a Free system, I /might/ work around it while simultaneously getting it fixed upstream[1]. But this is a non-fatal error and just writes to the log, it won't stop Rainbows! from working. You can still set the limit higher before you start the process. If you're stuck on OSX, pressure OSX devs into fixing it. Remember, you (or your organization) _paid_ for OSX. > Currently setting this kind of limits on OSX is tricky at best and for > some is not a recommended practice, I will not be surprised if this > turns out to be a Ruby bug. I'm using 1.9.3-preview1 for this tests. Reading over the code in the Ruby trunk and ruby_1_9_3 branch, it looks fine and runs fine on GNU/Linux. [1] - we've done this in the past with MRI 1.8/1.9 bugs and have gotten everything fixed upstream _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying