all repos — slstatus @ b640cc489b65153efcb519feb9038d658b4bf005

my build of slstatus (tools.suckless.org/slstatus/)

Check return value of pclose()
Laslo Hunhold dev@frign.de
Sun, 20 May 2018 00:57:24 +0200
commit

b640cc489b65153efcb519feb9038d658b4bf005

parent

c12b9cc50b5f476cd7b1de1dbd49e6282b1a042f

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M components/run_command.ccomponents/run_command.c

@@ -16,7 +16,10 @@ warn("popen '%s':", cmd);

return NULL; } p = fgets(buf, sizeof(buf) - 1, fp); - pclose(fp); + if (pclose(fp) < 0) { + warn("pclose '%s':", cmd); + return NULL; + } if (!p) { return NULL; }