This website works better with JavaScript.
Home
Explore
Help
Sign In
rinri
/
slstatus
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Check return value of pclose()
master
Laslo Hunhold
6 years ago
committed by
Aaron Marcher
parent
c12b9cc50b
commit
b640cc489b
1 changed files
with
4 additions
and
1 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-1
components/run_command.c
+ 4
- 1
components/run_command.c
View File
@@ -16,7 +16,10 @@ run_command(const char *cmd)
return NULL;
return NULL;
}
}
p = fgets(buf, sizeof(buf) - 1, fp);
p = fgets(buf, sizeof(buf) - 1, fp);
pclose(fp);
if (pclose(fp) < 0) {
warn("pclose '%s':", cmd);
return NULL;
}
if (!p) {
if (!p) {
return NULL;
return NULL;
}
}
Write
Preview
Loading…
Cancel
Save