diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2019-02-19 22:42:42 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2019-02-19 22:42:42 +0000 |
commit | 214fed708bee6aa6e7f834f2567cc84a6d98d0fa (patch) | |
tree | 3a0a3ab5537e7e9b63bfa786c03c424e04997e35 | |
parent | 8c64f112e83f10e56a4c898eec73f65b43db8222 (diff) |
open the coredump file non-blocking. cheloha found it blocks with a fifo.
ok cheloha deraadt
-rw-r--r-- | sys/kern/kern_sig.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 0993d8aa810..39a789987e5 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.227 2019/01/23 21:53:42 cheloha Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.228 2019/02/19 22:42:41 tedu Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -1580,7 +1580,8 @@ coredump(struct proc *p) NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name, p); - error = vn_open(&nd, O_CREAT | FWRITE | O_NOFOLLOW, S_IRUSR | S_IWUSR); + error = vn_open(&nd, O_CREAT | FWRITE | O_NOFOLLOW | O_NONBLOCK, + S_IRUSR | S_IWUSR); if (error) goto out; |