Commit ab01dd37 authored by simonmar's avatar simonmar
Browse files

[project @ 2001-10-31 10:30:29 by simonmar]

Add setNonBlockingFd(), for use in the SIGCONT handler in Signals.c.
parent 3c459be8
/* -----------------------------------------------------------------------------
* $Id: RtsUtils.c,v 1.22 2001/08/29 15:02:02 sewardj Exp $
* $Id: RtsUtils.c,v 1.23 2001/10/31 10:30:29 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -238,6 +238,18 @@ resetNonBlockingFd(int fd)
#endif
}
void
setNonBlockingFd(int fd)
{
long fd_flags;
#if !defined(mingw32_TARGET_OS)
/* clear the non-blocking flag on this file descriptor */
fd_flags = fcntl(fd, F_GETFL);
fcntl(fd, F_SETFL, fd_flags | O_NONBLOCK);
#endif
}
static ullong startTime = 0;
/* used in a parallel setup */
......
/* -----------------------------------------------------------------------------
* $Id: RtsUtils.h,v 1.11 2001/08/29 14:55:58 sewardj Exp $
* $Id: RtsUtils.h,v 1.12 2001/10/31 10:30:29 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -21,7 +21,8 @@ extern void _stgAssert (char *filename, unsigned int linenum);
extern void heapOverflow(void);
void resetNonBlockingFd(int fd);
extern void setNonBlockingFd(int fd);
extern void resetNonBlockingFd(int fd);
extern nat stg_strlen(char *str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment