From 214fed708bee6aa6e7f834f2567cc84a6d98d0fa Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 19 Feb 2019 22:42:42 +0000 Subject: open the coredump file non-blocking. cheloha found it blocks with a fifo. ok cheloha deraadt --- sys/kern/kern_sig.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/kern/kern_sig.c') 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; -- cgit v1.2.3