QProcess/Unix: remove unnecessary chdir("/") before _exit()

That only created an opportunity for qWarning(), which should never be
in the child process in the first place.

Change-Id: Ic90d8429a0eb4837971dfffd1664e57a2291ea78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: David Llewellyn-Jones <david.llewellyn-jones@jolla.com>
(cherry picked from commit e274d56effc13e4ba7c5fcec783c3227551551c6)
This commit is contained in:
Thiago Macieira 2021-02-18 08:47:59 -08:00
parent f9d13af6d1
commit ef1a0231e0

View File

@ -978,8 +978,6 @@ bool QProcessPrivate::startDetached(qint64 *pid)
qt_safe_close(startedPipe[1]);
qt_safe_write(pidPipe[1], (const char *)&doubleForkPid, sizeof(pid_t));
if (QT_CHDIR("/") == -1)
qWarning("QProcessPrivate::startDetached: failed to chdir to /");
::_exit(1);
}