Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f67fa55 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sf: Block SIGPIPE signal to avoid crash"

parents d8c2a221 67301c3e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -415,6 +415,12 @@ void SurfaceFlinger::init() {
    status_t err;
    Mutex::Autolock _l(mStateLock);

    /* Set the mask bit of the sigset to block the SIGPIPE signal */
    sigset_t sigMask;
    sigemptyset (&sigMask);
    sigaddset(&sigMask, SIGPIPE);
    sigprocmask(SIG_BLOCK, &sigMask, NULL);

    // initialize EGL for the default display
    mEGLDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
    eglInitialize(mEGLDisplay, NULL, NULL);