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=-0.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: stderr_path doesn't work at the moment of being called Date: Tue, 5 Jan 2010 13:47:08 -0800 Message-ID: <20100105214708.GB15213@dcvr.yhbt.net> References: <201001051126.32449.ibc@aliax.net> <201001051132.37358.ibc@aliax.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1262728200 23395 80.91.229.12 (5 Jan 2010 21:50:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jan 2010 21:50:00 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Tue Jan 05 22:49:53 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline In-Reply-To: <201001051132.37358.ibc@aliax.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:303 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1NSHHk-0001XD-Si for gclrug-mongrel-unicorn@m.gmane.org; Tue, 05 Jan 2010 22:49:53 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 70AEE1779942; Tue, 5 Jan 2010 16:49:52 -0500 (EST) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 81A5F1779941 for ; Tue, 5 Jan 2010 16:47:09 -0500 (EST) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 10BE31F4E5; Tue, 5 Jan 2010 21:47:09 +0000 (UTC) I=F1aki Baz Castillo wrote: > El Martes, 5 de Enero de 2010, I=F1aki Baz Castillo escribi=F3: > = > > The second workaround is exactly what Unicorn does when calling to > > "stderr_path" ("redirect_io" method). So, why doesn't work for me witho= ut > > the hacks? do I miss something? > = > By running 'exec "ls -l /proc/$$/fd"' after 'stderr_path' I've realized t= hat = > the stderr is still pointing to /dev/pts/N. Perhaps the method is called = later = > and now it's just "eval"-ulated? The value is stored and then set later. I avoid changing internal configuration variables during evaluation time for several reasons: 1. A Unicorn config file is typically the last thing configured for an application, when a user is testing their configuration it's easier to see the error message in the console if it's in the Unicorn config file 2. HUP-ing a with a bad config file should not leave the server in an unknown state. There are still some things that bind immediately (working_directory, all of Rainbows!) for now, but for the most part it should be possible to recover on bad HUPs. 3. "working_directory" needs to be factored in for non-absolute paths. I prefer to work with absolute paths, but some people like non-absolute ones for various reasons. So we always ensure stderr_path is set after "working_directory" is called. -- = Eric Wong _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying