diff options
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 6648917..5f2da95 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1007,6 +1007,8 @@ setugidsafety(p) if (*fpp != NULL && is_unsafe(*fpp)) { if ((*fdfp & UF_MAPPED) != 0) (void) munmapfd(p, i); + if (i < fdp->fd_knlistsize) + knote_fdclose(p, i); (void) closef(*fpp, p); *fpp = NULL; *fdfp = 0; @@ -1040,6 +1042,8 @@ fdcloseexec(p) if (*fpp != NULL && (*fdfp & UF_EXCLOSE)) { if (*fdfp & UF_MAPPED) (void) munmapfd(p, i); + if (i < fdp->fd_knlistsize) + knote_fdclose(p, i); (void) closef(*fpp, p); *fpp = NULL; *fdfp = 0; |