def _waitForStart(self, readPipe):
        """
        Wait for the daemonization success.

        @param readPipe: file descriptor to read start information from.
        @type readPipe: C{int}

        @return: code to be passed to C{os._exit}: 0 for success, 1 for error.
        @rtype: C{int}
        """
        data = untilConcludes(os.read, readPipe, 100)
        dataRepr = _bytesRepr(data[2:])
        if data != b"0":
            msg = ("An error has occurred: {}\nPlease look at log "
                   "file for more information.\n".format(dataRepr))
            untilConcludes(sys.__stderr__.write, msg)
            return 1
        return 0

        Wait for the daemonization success.

        @param readPipe: file descriptor to read start information from.
        @type readPipe: C{int}

        @return: code to be passed to C{os._exit}: 0 for success, 1 for error.
        @rtype: C{int}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/scripts/_twistd_unix.py