rootless: fix hang on s390x

avoid using the glibc fork() function after using directly the clone()
syscall, as it confuses glibc causing the fork() to hang in some
cases.

The issue has been observed only on s390x, and the fix was confirmed
in the issue discussion.

Closes: https://github.com/containers/podman/issues/25184

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2025-02-06 13:49:51 +01:00
committed by openshift-cherrypick-robot
parent 582d7185df
commit d280feb96c

View File

@@ -658,7 +658,7 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
if (pipe (p) < 0)
return -1;
pid = fork ();
pid = syscall_clone (SIGCHLD, NULL);
if (pid < 0)
{
close (p[0]);
@@ -689,7 +689,7 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
close (p[0]);
setsid ();
pid = fork ();
pid = syscall_clone (SIGCHLD, NULL);
if (pid < 0)
_exit (EXIT_FAILURE);