logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

avoid_sys_clone.patch (541B)


  1. # SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com>
  2. # SPDX-License-Identifier: MIT
  3. --- musl-1.1.24/src/process/posix_spawn.c 2019-10-13 21:58:27.000000000 +0000
  4. +++ musl-1.1.24/src/process/posix_spawn.c 2023-04-07 11:50:47.253113271 +0000
  5. @@ -182,8 +182,11 @@
  6. args.envp = envp;
  7. pthread_sigmask(SIG_BLOCK, SIGALL_SET, &args.oldmask);
  8. - pid = __clone(child, stack+sizeof stack,
  9. - CLONE_VM|CLONE_VFORK|SIGCHLD, &args);
  10. + pid = fork();
  11. + if (pid == 0) {
  12. + _exit(child(&args));
  13. + }
  14. +
  15. close(args.p[1]);
  16. if (pid > 0) {