summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_descrip.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r--sys/kern/kern_descrip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 6c9ca9d..13b339b 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -969,6 +969,12 @@ fpathconf(td, uap)
if ((error = fget(td, uap->fd, &fp)) != 0)
return (error);
+
+ /* If asynchronous I/O is available, it works for all descriptors. */
+ if (uap->name == _PC_ASYNC_IO) {
+ td->td_retval[0] = async_io_version;
+ goto out;
+ }
switch (fp->f_type) {
case DTYPE_PIPE:
case DTYPE_SOCKET:
@@ -990,6 +996,7 @@ fpathconf(td, uap)
error = EOPNOTSUPP;
break;
}
+out:
fdrop(fp, td);
return (error);
}
OpenPOWER on IntegriCloud