mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 03:08:31 +00:00
Get redbean -X running in blinkenlights again
This change improves the loading of APE executables in Blinkenlights and adds some system call wrappers that were previous missing.
This commit is contained in:
parent
4700984456
commit
866b21a151
3 changed files with 120 additions and 5 deletions
|
@ -115,8 +115,15 @@ 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) return -1;
|
||||
if (!(pid = vfork())) {
|
||||
if (sys_pipe(pipefds) == -1) {
|
||||
return -1;
|
||||
}
|
||||
if ((pid = vfork()) == -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue