patch-2.0.28 linux/fs/select.c
Next file: linux/fs/smbfs/proc.c
Previous file: linux/fs/binfmt_elf.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Mon Dec 30 15:57:02 1996
- Orig file:
v2.0.27/linux/fs/select.c
- Orig date:
Fri Jul 5 13:48:39 1996
diff -u --recursive --new-file v2.0.27/linux/fs/select.c linux/fs/select.c
@@ -122,17 +122,20 @@
repeat:
current->state = TASK_INTERRUPTIBLE;
for (i = 0 ; i < n ; i++) {
- if (FD_ISSET(i,in) && check(SEL_IN,wait,current->files->fd[i])) {
+ struct file * file = current->files->fd[i];
+ if (!file)
+ continue;
+ if (FD_ISSET(i,in) && check(SEL_IN,wait,file)) {
FD_SET(i, res_in);
count++;
wait = NULL;
}
- if (FD_ISSET(i,out) && check(SEL_OUT,wait,current->files->fd[i])) {
+ if (FD_ISSET(i,out) && check(SEL_OUT,wait,file)) {
FD_SET(i, res_out);
count++;
wait = NULL;
}
- if (FD_ISSET(i,ex) && check(SEL_EX,wait,current->files->fd[i])) {
+ if (FD_ISSET(i,ex) && check(SEL_EX,wait,file)) {
FD_SET(i, res_ex);
count++;
wait = NULL;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov