Skip to content

Commit c06dba4

Browse files
committed
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: #25184 Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent 757c621 commit c06dba4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/rootless/rootless_linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
658658
if (pipe (p) < 0)
659659
return -1;
660660

661-
pid = fork ();
661+
pid = syscall_clone (SIGCHLD, NULL);
662662
if (pid < 0)
663663
{
664664
close (p[0]);
@@ -689,7 +689,7 @@ create_pause_process (const char *pause_pid_file_path, char **argv)
689689
close (p[0]);
690690

691691
setsid ();
692-
pid = fork ();
692+
pid = syscall_clone (SIGCHLD, NULL);
693693
if (pid < 0)
694694
_exit (EXIT_FAILURE);
695695

0 commit comments

Comments
 (0)