[commit: ghc] master: base: Add more detail to FD_SETSIZE related error message (022455f)

git at git.haskell.org git at git.haskell.org
Tue Sep 19 21:55:40 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/022455ffcf01e950ec020f9873874e68fbf7c666/ghc

>---------------------------------------------------------------

commit 022455ffcf01e950ec020f9873874e68fbf7c666
Author: Niklas Hambüchen <mail at nh2.me>
Date:   Tue Sep 19 15:14:27 2017 -0400

    base: Add more detail to FD_SETSIZE related error message
    
    Reviewers: bgamari, austin, hvr
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3960


>---------------------------------------------------------------

022455ffcf01e950ec020f9873874e68fbf7c666
 libraries/base/cbits/inputReady.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libraries/base/cbits/inputReady.c b/libraries/base/cbits/inputReady.c
index 916633c..481c9de 100644
--- a/libraries/base/cbits/inputReady.c
+++ b/libraries/base/cbits/inputReady.c
@@ -80,8 +80,7 @@ fdReady(int fd, int write, int msecs, int isSock)
         struct timeval remaining_tv;
 
         if ((fd >= (int)FD_SETSIZE) || (fd < 0)) {
-            fprintf(stderr, "fdReady: fd is too big");
-            abort();
+            barf("fdReady: fd is too big: %d but FD_SETSIZE is %d", fd, (int)FD_SETSIZE);
         }
         FD_ZERO(&rfd);
         FD_ZERO(&wfd);



More information about the ghc-commits mailing list