[Issue 22222] Custom unittest runner on phobos fails due to segfault on fork() exiting

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 19 00:59:57 UTC 2021


Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
           Keywords|                            |pull

--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@ljmf00 updated dlang/phobos pull request #8197 "std.stdio: change exit(0) to
_exit(0) to prevent segfault" fixing this issue:

- std.stdio: change exit(0) to _exit(0) to prevent segfault

  Fixes #22222.

  `exit(0)` call from libc does an exit sequence before exit and therefore
  doesn't exit immediately. This causes problems on custom unittest runners. To
  circunvent this problem we should call `_exit()` syscall to exit immediately.
  In this context this is just fine to do and can prevent any future
  when debugging.

  Signed-off-by: Luís Ferreira <contact at lsferreira.net>



More information about the Digitalmars-d-bugs mailing list