Changeset b8b76e in git


Ignore:
Timestamp:
Jan 9, 2017, 4:40:23 PM (6 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
f0bd4cf28bbb221bfdd95862537792a67c30ef12
Parents:
a5bbb56085d44c9d5afaddeb51fc853641212f0c
Message:
Jean-Pierre Flori: fgets handling reports error when stdin gets closed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/oswrapper/feread.cc

    ra5bbb5 rb8b76e  
    327327    {
    328328      case 0:     return NULL;           /*EOF */
     329      case EBADF: return NULL;           /* stdin got closed */
    329330      case EINTR: return strcpy(s,"\n"); /* CTRL-C or other signal */
    330331      default:                           /* other error */
    331332      {
    332         int errsv = errno;
    333         fprintf(stderr,"fgets() failed with errno %d\n",errsv);
     333        int errsv = errno;
     334        fprintf(stderr,"fgets() failed with errno %d\n%s\n",errsv,strerror(errsv));
    334335        return NULL;
    335336      }
Note: See TracChangeset for help on using the changeset viewer.