X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsUtils.c;h=6ff4f72109efd14f8caab9e0ed869c0eaefa1fff;hb=dc801dc275fb8f81d482535b4d6317e234bb10f8;hp=9637db0c98e69052339f7f0cb3acd707944bf419;hpb=cffcb52b7b7518db39d64394270392d06215cf90;p=ghc-hetmet.git diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 9637db0..6ff4f72 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsUtils.c,v 1.35 2003/08/22 22:24:16 sof Exp $ + * $Id: RtsUtils.c,v 1.36 2003/10/21 11:51:15 stolz Exp $ * * (c) The GHC Team, 1998-2002 * @@ -249,7 +249,9 @@ setNonBlockingFd(int fd) /* clear the non-blocking flag on this file descriptor */ fd_flags = fcntl(fd, F_GETFL); - fcntl(fd, F_SETFL, fd_flags | O_NONBLOCK); + if (!(fd_flags & O_NONBLOCK)) { + fcntl(fd, F_SETFL, fd_flags | O_NONBLOCK); + } } #else /* Stub defns -- async / non-blocking IO is not done