From b76ec2c143554174b3e513402f91c5f8c54a02fe Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Mon, 15 Aug 2005 10:43:54 +0000 Subject: [PATCH] - We now check if the file refers to a pipe before we make assumptions. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15016 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/socket_select.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/library/socket_select.c b/library/socket_select.c index 6979a1f..d5eda1f 100644 --- a/library/socket_select.c +++ b/library/socket_select.c @@ -1,5 +1,5 @@ /* - * $Id: socket_select.c,v 1.12 2005-08-15 10:17:47 obarthel Exp $ + * $Id: socket_select.c,v 1.13 2005-08-15 10:43:54 obarthel Exp $ * * :ts=4 * @@ -331,6 +331,14 @@ map_descriptor_sets( SHOWMSG("file is unusable; we cannot examine the file."); continue; } + + /* If we can't make assumptions about the file position, then + this better be a pipe. */ + if(FLAG_IS_CLEAR(fd->fd_Flags,FDF_CACHE_POSITION) && fib->fib_DirEntryType != ST_PIPEFILE) + { + SHOWMSG("file is unusable; it is not a file system and not a pipe."); + continue; + } } if(file_fds != NULL && file_fd < num_file_fds)