<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,7 +25,14 @@ init([]) -&gt;
       ping_master(MasterNode);
     undefined -&gt;
       MasterNode = node()
-  end,  
+  end,
+  
+  case application:get_env(pidfile) of
+    {ok, Location} -&gt;
+      Pid = os:getpid(),
+      ok = file:write_file(Location, list_to_binary(Pid));
+    undefined -&gt; ok
+  end,
   
   case application:get_env(conf) of
     {ok, Conf} -&gt;
@@ -89,4 +96,4 @@ figure_responder() -&gt;
   end.
       
 process_appmods(undefined) -&gt; [];
-process_appmods({ok, V}) -&gt; V.
+process_appmods({ok, V}) -&gt; V.
\ No newline at end of file</diff>
      <filename>elibs/fuzed_frontend_supervisor.erl</filename>
    </modified>
    <modified>
      <diff>@@ -76,6 +76,10 @@ OptionParser.new do |opts|
   opts.on(&quot;-p&quot;, &quot;--port PORT&quot;, &quot;Port for web server.&quot;) do |dir|
     options[:port] = dir
   end
+  
+  opts.on(&quot;-P&quot;, &quot;--pidfile PIDFILE&quot;, &quot;Location to write pid file.&quot;) do |pidfile|
+    options[:pidfile] = pidfile
+  end
 
   opts.on(&quot;-f&quot;, &quot;--frontend-responder MODULE&quot;, &quot;Module to use for Pool calculation.&quot;) do |mod|
     options[:module] = mod
@@ -101,6 +105,8 @@ detached = options[:detached] ? '-detached' : ''
 master = options[:master_name] || DEFAULT_MASTER_NODE
 nodename = options[:name] || DEFAULT_NODE_NAME
 
+pidfile = options[:pidfile] ? &quot;-fuzed_frontend pidfile \&quot;'#{options[:pidfile]}'\&quot;&quot; : ''
+
 spec = options[:spec] || &quot;kind=normal&quot;
 details = details_from_string(spec)
 
@@ -119,6 +125,7 @@ if options[:conf]
              #{code_paths}
              -name '#{nodename}' \
              -setcookie #{cookie_hash(master)} \
+             #{pidfile} \
              -fuzed_frontend master &quot;'#{master}'&quot; \
              -fuzed_frontend details #{details} \
              -fuzed_frontend conf &quot;'#{options[:conf]}'&quot; \
@@ -153,6 +160,7 @@ else
                #{code_paths}
                -name '#{nodename}' \
                -setcookie #{cookie_hash(master)} \
+               #{pidfile} \
                -fuzed_frontend master &quot;'#{master}'&quot; \
                -fuzed_frontend http_server '#{http_server}' \
                -fuzed_frontend details #{details} \</diff>
      <filename>rlibs/cli/frontend.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>508131296a13d94ad67fafe083258faa3e9074e4</id>
    </parent>
  </parents>
  <author>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </author>
  <url>http://github.com/KirinDave/fuzed/commit/54a10b2ed8ca703c2e5d285ff7bdab11c0b5daff</url>
  <id>54a10b2ed8ca703c2e5d285ff7bdab11c0b5daff</id>
  <committed-date>2008-06-14T20:13:40-07:00</committed-date>
  <authored-date>2008-06-14T20:13:40-07:00</authored-date>
  <message>pid file option for frontend</message>
  <tree>68a5c5588ae5d880d7fe70e2094f584b4c66bdcb</tree>
  <committer>
    <name>Tom Preston-Werner</name>
    <email>tom@mojombo.com</email>
  </committer>
</commit>
