How to override "Worker#proc_name" method?

Iñaki Baz Castillo ibc at
Wed Dec 23 07:17:14 EST 2009

Hi, I'm trying to override Unicorn::HttpServer::Worker#proc_name method. For 
that, I've copied bin/unicorn with other name and added the following code 
before "Unicorn::Launcher.daemonize! if daemonize" line:

module Unicorn
  class HttpServer
    class Worker
      def proc_name(tag)
          ... some proc name ...

However it doesn't work and workers still read the original method. I've also 
tryed by using "-r" option to load a library containing such modifications.

I suspect what is happening: When Unicorn creates the forked workers each of 
them is a new process which performs "require 'unicorn'" so the workers don't 
read my customizations. Am I right? If so, is there some way to achieve it?

Thanks a lot.

Iñaki Baz Castillo <ibc at>

More information about the mongrel-unicorn mailing list