From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, URIBL_BLOCKED shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3C7F11FE1C; Wed, 23 Sep 2015 08:30:25 +0000 (UTC) Date: Wed, 23 Sep 2015 08:30:25 +0000 From: Eric Wong To: "Lin Jen-Shin (godfat)" Cc: yahns-public@yhbt.net Subject: Re: -1 shutdown_timeout? Message-ID: <20150923083025.GA22196@dcvr.yhbt.net> References: <20150923080504.GA19141@dcvr.yhbt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: "Lin Jen-Shin (godfat)" wrote: > However instead of setting shutdown_timeout, I think I would probably > need to make the application know that the server is shutting down, > and stop right there instead of waiting for full 60 seconds. > > Not sure if I could do this without talking to yahns directly... This is a Rack app? I really don't want to introduce custom APIs for this which would lock Rack users down to yahns. I suppose you could chain signal handlers, though: orig_quit = nil orig_quit = trap(:QUIT) do app_specific_quit orig_quit.call end (Ditto for TERM/INT, totally untested)