logo

live-bootstrap

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

avoid_sys_clone.patch (487B)


  1. # SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com>
  2. # SPDX-License-Identifier: MIT
  3. --- musl-1.2.4/src/process/posix_spawn.c 2022-04-07 17:12:40.000000000 +0000
  4. +++ musl-1.2.4/src/process/posix_spawn.c 2023-04-07 12:01:57.217126467 +0000
  5. @@ -190,8 +190,11 @@
  6. goto fail;
  7. }
  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. UNLOCK(__abort_lock);