diff options
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 13 |
1 files changed, 5 insertions, 8 deletions
| @@ -1300,15 +1300,12 @@ run(void) { | |||
| 1300 | eprint("select failed\n"); | 1300 | eprint("select failed\n"); |
| 1301 | } | 1301 | } |
| 1302 | if(FD_ISSET(STDIN_FILENO, &rd)) { | 1302 | if(FD_ISSET(STDIN_FILENO, &rd)) { |
| 1303 | if(stext == fgets(stext, sizeof stext - 1, stdin)) | 1303 | if((readin = (stext == fgets(stext, sizeof stext - 1, stdin)))) |
| 1304 | stext[strlen(stext) - 1] = '\0'; /* remove tailing '\n' */ | 1304 | stext[strlen(stext) - 1] = '\0'; /* remove tailing '\n' */ |
| 1305 | else { | 1305 | else if(feof(stdin)) |
| 1306 | readin = False; | 1306 | strncpy(stext, "EOF", 4); |
| 1307 | if(feof(stdin)) | 1307 | else /* error occured */ |
| 1308 | strncpy(stext, "EOF", 4); | 1308 | strncpy(stext, strerror(errno), sizeof stext - 1); |
| 1309 | else /* error occured */ | ||
| 1310 | strncpy(stext, strerror(errno), sizeof stext - 1); | ||
| 1311 | } | ||
| 1312 | drawbar(); | 1309 | drawbar(); |
| 1313 | } | 1310 | } |
| 1314 | while(XPending(dpy)) { | 1311 | while(XPending(dpy)) { |
