Skip to content

Commit

Permalink
Merge pull request containers#16188 from eriksjolund/fix_issue_15927
Browse files Browse the repository at this point in the history
rootless: fix return value handling
  • Loading branch information
openshift-merge-robot authored Oct 17, 2022
2 parents 45fea91 + cb2631b commit 29d0cbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/rootless/rootless_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,15 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
if (pid)
{
char b;
int r;
int r, r2;

close (p[1]);
/* Block until we write the pid file. */
r = TEMP_FAILURE_RETRY (read (p[0], &b, 1));
close (p[0]);

r = reexec_in_user_namespace_wait (pid, 0);
if (r != 0)
r2 = reexec_in_user_namespace_wait (pid, 0);
if (r2 != 0)
return -1;

return r == 1 && b == '0' ? 0 : -1;
Expand Down

0 comments on commit 29d0cbe

Please sign in to comment.