mirror of git://git.musl-libc.org/musl
don't fail posix_spawn on failed close
the resolution of austin group issue #370 removes the requirement that posix_spawn fail when the close file action is performed on an already-closed fd. since there are no other meaningful errors for close, just ignoring the return value completely is the simplest fix.
This commit is contained in:
parent
014275b547
commit
1c12c24364
|
@ -102,8 +102,7 @@ static int child(void *args_vp)
|
||||||
}
|
}
|
||||||
switch(op->cmd) {
|
switch(op->cmd) {
|
||||||
case FDOP_CLOSE:
|
case FDOP_CLOSE:
|
||||||
if ((ret=__syscall(SYS_close, op->fd)))
|
__syscall(SYS_close, op->fd);
|
||||||
goto fail;
|
|
||||||
break;
|
break;
|
||||||
case FDOP_DUP2:
|
case FDOP_DUP2:
|
||||||
if ((ret=__sys_dup2(op->srcfd, op->fd))<0)
|
if ((ret=__sys_dup2(op->srcfd, op->fd))<0)
|
||||||
|
|
Loading…
Reference in New Issue