D21465: Forward and log exit code of the nested process

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added inline comments.

INLINE COMMENTS

> main_wayland.cpp:251-254
> +            if (code) {
> +                qWarning() << "finished session process with code" << code << status;
> +            }
> +            QCoreApplication::instance()->exit(code);

From QProcess::exitCode documentation:

> This value is not valid unless exitStatus() returns NormalExit.

Perhaps, we need to do something like this

  if (status == QProcess::CrashExit) {
      qWarning() << "Session process has crashed";
      QCoreApplication::exit(-1);
      return;
  }
  
  if (code) {
      qWarning() << "Session process exited with code" << code;
  }
  
  QCoreApplication::exit(code);

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D21465

To: apol, #kwin
Cc: zzag, kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.