From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: unicorn-public@bogomips.org Delivered-To: pi@dcvr.yhbt.net Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A23691F59B for ; Fri, 23 Jan 2015 18:32:34 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id n3so4785532wiv.1 for ; Fri, 23 Jan 2015 10:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=jvK4BmgtH6raN8iHOojdXpSWJcdPLZZHSzG6I8KQRhg=; b=YuHqiaKTTihmrDUlJjScU5lRv5E9zCYzcv4jHSNqgML+LZXN+XISevMu8SEdJ2HQb0 s45JcO5I1cbytBLFt0wWxSQ/TMKmX73AUnMII6cSHZou94jW4wgkDGUSF0O87VVuZrYd Vd3jdmCTVvlY+Mg9txG0Y/dVQuuTRuQtTDdJZZ8BCFhji6JjXMd9lpF0y0OhNygQnEFw 6q6KOTxHq5FEalmFsQ4rSwy6ZCluP9RV6xSaAE2eD2T5zF/KLc7hNDCQTYxtSzUHWAO1 PBXWgzAR43kPIKJrZy9G6K9Pqk0Er+RHBFZGNcLrW4IiE8kjKSbHOK9sWunAvqvnhtWR iD4Q== MIME-Version: 1.0 X-Received: by 10.194.239.134 with SMTP id vs6mr16004203wjc.19.1422037953336; Fri, 23 Jan 2015 10:32:33 -0800 (PST) Received: by 10.217.13.196 with HTTP; Fri, 23 Jan 2015 10:32:33 -0800 (PST) Date: Fri, 23 Jan 2015 10:32:33 -0800 Message-ID: Subject: global variable in after_fork From: Joe Williams To: unicorn-public@bogomips.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: PublicInbox::Filter 0.0.1 I am attempting to do something like the following: after_fork do |server, worker| $unicorn_uptime = Time.now.to_i.to_s $unicorn_uptime.freeze Unfortunately the variable comes up nil when later accessed. Anyone have thoughts on what I am missing? Thanks! -Joe