<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - streamline benchmark-runner browser"
   href="https://bugs.webkit.org/show_bug.cgi?id=145582#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - streamline benchmark-runner browser"
   href="https://bugs.webkit.org/show_bug.cgi?id=145582">bug 145582</a>
              from <span class="vcard"><a class="email" href="mailto:slewis&#64;apple.com" title="Stephanie Lewis &lt;slewis&#64;apple.com&gt;"> <span class="fn">Stephanie Lewis</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=145582#c2">comment #2</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=254127&amp;action=diff" name="attach_254127" title="patch">attachment 254127</a> <a href="attachment.cgi?id=254127&amp;action=edit" title="patch">[details]</a></span>
&gt; patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=254127&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=254127&amp;action=review</a>
&gt; 
&gt; &gt; Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:32
&gt; &gt; +        process = subprocess.Popen(['open', '-a', appPath] + args)
&gt; &gt; +        cls.launchCaffeinateForProcess(process.pid)
&gt; 
&gt; Instead of having a helper function to launch caffinate, why don't we add a
&gt; method e.g. launchProcessWithCaffinate that launches both the target process
&gt; and caffeinate?
&gt; 
&gt; &gt; Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:43
&gt; &gt; +        subprocess.Popen([&quot;/usr/bin/caffeinate&quot;, &quot;-disw&quot;, str(pid)])
&gt; 
&gt; Does caffeinate automatically terminate?</span >

Yeah Caffeinate takes the pid of a process to watch and terminates when the process terminates.

<span class="quote">&gt; 
&gt; &gt; Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:39
&gt; &gt; +        self.safariProcess = subprocess.Popen(args, env=env)
&gt; &gt; +
&gt; &gt; +        OSXSafariDriver.launchCaffeinateForProcess(self.safariProcess.pid)
&gt; 
&gt; That way, we can just call that function instead of Popen'ing and calling a
&gt; separate helper function.</span ></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>