>From 7aec3c7f83430900e91f7df854577f1bac5e7c3a Mon Sep 17 00:00:00 2001
From: Jeremy Evans <[email protected]>
Date: Fri, 2 Jul 2010 13:46:15 -0700
Subject: [PATCH] Show the current working directory in the proc title
This is helpful if you run a server with many web apps in separate
directories all running unicorn, as it allows you to easily see
which processes are tied to which app.
---
lib/unicorn.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/unicorn.rb b/lib/unicorn.rb
index a7b0646..a764cd7 100644
--- a/lib/unicorn.rb
+++ b/lib/unicorn.rb
@@ -811,8 +811,8 @@ module Unicorn
end
def proc_name(tag)
- $0 = ([ File.basename(START_CTX[0]), tag
- ]).concat(START_CTX[:argv]).join(' ')
+ $0 = ([ File.basename(START_CTX[0]), File.basename(START_CTX[:cwd]),
+ tag ]).concat(START_CTX[:argv]).join(' ')
end
def redirect_io(io, path)
--
1.7.0.5
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying