mirror of
https://github.com/containers/podman.git
synced 2025-06-29 15:08:09 +08:00
Merge pull request #16188 from eriksjolund/fix_issue_15927
rootless: fix return value handling
This commit is contained in:
@ -506,15 +506,15 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
|
|||||||
if (pid)
|
if (pid)
|
||||||
{
|
{
|
||||||
char b;
|
char b;
|
||||||
int r;
|
int r, r2;
|
||||||
|
|
||||||
close (p[1]);
|
close (p[1]);
|
||||||
/* Block until we write the pid file. */
|
/* Block until we write the pid file. */
|
||||||
r = TEMP_FAILURE_RETRY (read (p[0], &b, 1));
|
r = TEMP_FAILURE_RETRY (read (p[0], &b, 1));
|
||||||
close (p[0]);
|
close (p[0]);
|
||||||
|
|
||||||
r = reexec_in_user_namespace_wait (pid, 0);
|
r2 = reexec_in_user_namespace_wait (pid, 0);
|
||||||
if (r != 0)
|
if (r2 != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return r == 1 && b == '0' ? 0 : -1;
|
return r == 1 && b == '0' ? 0 : -1;
|
||||||
|
Reference in New Issue
Block a user