patch-2.1.19 linux/fs/select.c
Next file: linux/fs/smbfs/proc.c
Previous file: linux/fs/proc/openpromfs.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Mon Dec 30 16:05:00 1996
- Orig file:
v2.1.18/linux/fs/select.c
- Orig date:
Tue Oct 29 19:58:44 1996
diff -u --recursive --new-file v2.1.18/linux/fs/select.c linux/fs/select.c
@@ -178,17 +178,21 @@
for (i = 0 ; i < n ; i++,fd++) {
unsigned long bit = BIT(i);
unsigned long *in = MEM(i,fds->in);
- if (ISSET(bit,__IN(in)) && check(SEL_IN,wait,*fd)) {
+ struct file * file = *fd;
+
+ if (!file)
+ continue;
+ if (ISSET(bit,__IN(in)) && check(SEL_IN,wait,file)) {
SET(bit, __RES_IN(in));
retval++;
wait = NULL;
}
- if (ISSET(bit,__OUT(in)) && check(SEL_OUT,wait,*fd)) {
+ if (ISSET(bit,__OUT(in)) && check(SEL_OUT,wait,file)) {
SET(bit, __RES_OUT(in));
retval++;
wait = NULL;
}
- if (ISSET(bit,__EX(in)) && check(SEL_EX,wait,*fd)) {
+ if (ISSET(bit,__EX(in)) && check(SEL_EX,wait,file)) {
SET(bit, __RES_EX(in));
retval++;
wait = NULL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov