<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - wayland: do not use g_error() on connection errors"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=745289">745289</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>wayland: do not use g_error() on connection errors
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Platform
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>gtk+
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: Wayland
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>gtk-bugs@gtk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ofourdan@redhat.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>gtk-bugs@gtk.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>rob@robster.org.uk, wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>GNOME version</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=298092&action=diff" name="attach_298092" title="Patch to fix the issue.">attachment 298092</a> <a href="attachment.cgi?id=298092&action=edit" title="Patch to fix the issue.">[details]</a></span> <a href='/review?bug=745289&attachment=298092'>[review]</a>
Patch to fix the issue.

When the Wayland compositor vanishes, all applications connected will receive a
SIGPIPE as soon as they try to use wl_display_dispatch().

Do not use g_error() to terminate the applications when this occurs, g_error()
means an error in the application while here it's not truly the case:

<a href="https://developer.gnome.org/glib/stable/glib-Message-Logging.html#g-error">https://developer.gnome.org/glib/stable/glib-Message-Logging.html#g-error</a>

"[...] This function will result in a core dump; don't use it for errors you
expect. Using this function indicates a bug in your program, i.e. an assertion
failure."

This can lead automated bug reporting tools to automatically log bugs for
various components even though this is perfectly normal (at least not a bug in
the components)...

So instead of g_error(), use g_printerr() and exit() just like other backend do
in such case (e.g. Broadway backend).</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>