diff options
author | phk <phk@FreeBSD.org> | 1996-06-06 17:17:54 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-06-06 17:17:54 +0000 |
commit | 09a08e98f086bbc99b799cef17f288511f9050ad (patch) | |
tree | b0b320ab6fa73c1ac32669f07a0083d44e524f25 /sys/kern/kern_sysctl.c | |
parent | c6eabb927488269337f3da1d06a644ee7f8305cc (diff) | |
download | FreeBSD-src-09a08e98f086bbc99b799cef17f288511f9050ad.zip FreeBSD-src-09a08e98f086bbc99b799cef17f288511f9050ad.tar.gz |
If handler function returns EAGAIN, restart operation.
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 6255226..51c78b9 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.61 1996/04/07 13:03:06 phk Exp $ + * $Id: kern_sysctl.c,v 1.62 1996/04/13 13:28:54 phk Exp $ */ #include <sys/param.h> @@ -739,7 +739,7 @@ int userland_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, int inkernel, void *new, size_t newlen, int *retval) { int error = 0; - struct sysctl_req req; + struct sysctl_req req, req2; bzero(&req, sizeof req); @@ -780,8 +780,12 @@ userland_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *old } memlock.sl_lock = 1; - error = sysctl_root(0, name, namelen, &req); + do { + req2 = req; + error = sysctl_root(0, name, namelen, &req2); + } while (error == EAGAIN); + req = req2; if (req.lock == 2) vsunlock(req.oldptr, req.oldlen, B_WRITE); |