Re: [GHC] #11697: rts/posix/Itimer.c: ignoring return value of ‘read’

GHC ghc-devs at haskell.org
Thu Mar 10 23:33:53 UTC 2016


#11697: rts/posix/Itimer.c: ignoring return value of ‘read’
-------------------------------------+-------------------------------------
        Reporter:  erikd             |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by erikd):

 Replying to [comment:3 hvr]:
 > IMO, in case of an unexpected return code we should rather emit some
 error/warning message. I would have fixed this myself a few days ago when
 this started breaking my `./validate`s but I didn't have time for a proper
 fix yet and was hoping the author of the patch would beat me providing a
 fix...


 Would you prefer something like:

 {{{
         if (USE_TIMERFD_FOR_ITIMER) {
             if (read(timerfd, &nticks, sizeof(nticks)) != sizeof(nticks))
                 sysErrorBelch("Itimer: read(timer_fd) failed");
         } else {
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11697#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list