Darling: exit() of FreeBSD libc is not being called

Created on 16 Jan 2017  路  1Comment  路  Source: darlinghq/darling

To reproduce:

Darling [~]$ mktemp  # works
/tmp/tmp.HwLVahuF
Darling [~]$ mktemp | cat
Darling [~]$

mktemp is in fact one of the few programs that do not call fflush or exit manually, thus exposing the issue.

dyld does exit(main(argc-1, &argv[1], envp)), but that's its own exit from host's libc, and it knows nothing about buffered I/O and whatever else Darling's/FreeBSD's libc wants to flush/close/dealloc at exit.

Bug

Most helpful comment

Good news is this will also get fixed after move to Mach-O.

>All comments

Good news is this will also get fixed after move to Mach-O.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrtino picture mrtino  路  3Comments

LubosD picture LubosD  路  3Comments

PhilipDeegan picture PhilipDeegan  路  7Comments

cgjames907 picture cgjames907  路  3Comments

pmannle picture pmannle  路  7Comments