diff options
author | dfuehrer <dfuehrer@email.arizona.edu> | 2021-03-23 18:29:19 -0700 |
---|---|---|
committer | dfuehrer <dfuehrer@email.arizona.edu> | 2021-03-23 18:31:57 -0700 |
commit | fc80bd975c264959a73e074bc2ff49c52c384ac3 (patch) | |
tree | 024b6d5e9b2ab9ebe54297f978a4d32a74ba79cb /dwmblocks.c | |
parent | Merge branch 'mychanges' into fastscroll_fix (diff) | |
download | dwmblocks-fc80bd975c264959a73e074bc2ff49c52c384ac3.tar.gz dwmblocks-fc80bd975c264959a73e074bc2ff49c52c384ac3.tar.bz2 dwmblocks-fc80bd975c264959a73e074bc2ff49c52c384ac3.tar.xz dwmblocks-fc80bd975c264959a73e074bc2ff49c52c384ac3.tar.zst dwmblocks-fc80bd975c264959a73e074bc2ff49c52c384ac3.zip |
reset errno so previous error doesn't cause next check to fail
Diffstat (limited to 'dwmblocks.c')
-rw-r--r-- | dwmblocks.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/dwmblocks.c b/dwmblocks.c index bbfad2d..0a0644f 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -97,11 +97,10 @@ void getcmd(const Block *block, char *output) char * s; int e; do { + errno = 0; s = fgets(tmpstr, CMDLENGTH-(strlen(delim)+1), cmdf); e = errno; } while (!s && e == EINTR); - // this is equivalent but less readable and stuff - //while(!fgets(tmpstr, CMDLENGTH-(strlen(delim)+1), cmdf) && errno == EINTR); pclose(cmdf); int i = strlen(block->icon); strcpy(output, block->icon); |