<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] WebProcess should run cleanup on quit to release resources"
   href="https://bugs.webkit.org/show_bug.cgi?id=168126#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] WebProcess should run cleanup on quit to release resources"
   href="https://bugs.webkit.org/show_bug.cgi?id=168126">bug 168126</a>
              from <span class="vcard"><a class="email" href="mailto:zan&#64;falconsigh.net" title="Zan Dobersek &lt;zan&#64;falconsigh.net&gt;"> <span class="fn">Zan Dobersek</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=168126#c0">comment #0</a>)
<span class="quote">&gt; When exiting MiniBrowser by closing the graphical window, WebPage::close()
&gt; is called on the WebProcess, and it leads most of the time to a successful
&gt; call of ~MediaPlayerPrivateGStreamerBase().</span >

This should always be the preferred path. To what degree things can be uninitialized is to be seen I guess. We've had issues with graphics drivers and atexit handlers before.

<span class="quote">&gt; When exiting MiniBrowser from command line with Ctrl-C, SIGINT is sent to
&gt; all process in the process group, and WebProcess quits without properly
&gt; destroying its objects.
&gt; When exiting MiniBrowser with killall (SIGTERM), the WebProcess also quits
&gt; without destroying its objects.</span >

This can get tricky. Ideally WebProcess would only be closed when the UIProcess signals it to do so. Sending SIGINT or SIGTERM directly at a WebProcess or NetworkProcess should also kill it.

But Ctrl-C is a bit special since it's super useful for development purposes, yet can't be worked around easily since it sends out SIGINT to all the processes in the process group, and AFAIU if we don't handle SIGINT in the WebProcess, SIGINT will kill that WebProcess before the UIProcess can shut it down when it handles its own SIGINT.</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>