Skip to content

Commit

Permalink
rootless: drop preexec hook error message
Browse files Browse the repository at this point in the history
the exec hooks already print the error message, so there is no need to
print another one.

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Mar 31, 2023
1 parent 3e44a7a commit 266cc78
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkg/rootless/rootless_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,11 @@ exec_binary (const char *path, char **argv, int argc)
exit (EXIT_FAILURE);
}
if (WIFEXITED(status) && WEXITSTATUS (status))
{
fprintf (stderr, "external preexec hook %s failed\n", path);
exit (WEXITSTATUS(status));
}
exit (WEXITSTATUS(status));
if (WIFSIGNALED (status))
{
fprintf (stderr, "external preexec hook %s failed\n", path);
exit (127+WTERMSIG (status));
}
exit (127+WTERMSIG (status));
if (WIFSTOPPED (status))
{
fprintf (stderr, "external preexec hook %s failed\n", path);
exit (EXIT_FAILURE);
}
}

static void
Expand Down

0 comments on commit 266cc78

Please sign in to comment.