mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 01:38:30 +00:00
Make more libc improvements
- Make memmem() faster - Make readdir() thread safe - Remove 64kb limit from mkdeps.com - Add old crypt() function from Musl - Improve new fix-third-party.py tool - Improve libc/isystem/ headers and fix bugs
This commit is contained in:
parent
a8cf0f7e89
commit
6a5717a48f
50 changed files with 3783 additions and 280 deletions
|
@ -120,18 +120,16 @@ static int PrintBacktraceUsingAddr2line(int fd, const struct StackFrame *bp) {
|
|||
j += uint64toarray_radix16(addr - 1, buf + j) + 1;
|
||||
}
|
||||
argv[i++] = NULL;
|
||||
if (sys_pipe(pipefds) == -1) {
|
||||
if (sys_pipe2(pipefds, O_CLOEXEC) == -1) {
|
||||
return -1;
|
||||
}
|
||||
if ((pid = vfork()) == -1) {
|
||||
if ((pid = fork()) == -1) {
|
||||
sys_close(pipefds[0]);
|
||||
sys_close(pipefds[1]);
|
||||
return -1;
|
||||
}
|
||||
if (!pid) {
|
||||
sys_dup2(pipefds[1], 1);
|
||||
if (pipefds[0] != 1) sys_close(pipefds[0]);
|
||||
if (pipefds[1] != 1) sys_close(pipefds[1]);
|
||||
sys_execve(addr2line, argv, environ);
|
||||
_Exit(127);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue