Review Request 113779: KInfocenter/OpenGL: fix ReadPipe() in the case that the command cannot be run
Commit Hook
null at kde.org
Mon Nov 11 11:31:50 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113779/#review43419
-----------------------------------------------------------
This review has been submitted with commit 9f70241d57f3ba1013b9f28650478c8bbb1233e0 by Wolfgang Bauer to branch master.
- Commit Hook
On Nov. 10, 2013, 12:20 a.m., Wolfgang Bauer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113779/
> -----------------------------------------------------------
>
> (Updated Nov. 10, 2013, 12:20 a.m.)
>
>
> Review request for kde-workspace and David Stephen Hubner.
>
>
> Bugs: 327382
> http://bugs.kde.org/show_bug.cgi?id=327382
>
>
> Repository: kde-workspace
>
>
> Description
> -------
>
> ReadPipe() doesn't return 0 as expected in the case that the command is not found. but the length of sh's output which is "command not found" in this case. This is because popen() does not fail if the command is not found, because it _can_ run "sh". (according to the man page, popen calls "/bin/sh -c command")
> To fix this, ReadPipe() should check the return code of the call to pclose() (see "man pclose"), and return 0 if this is not equal to 0.
>
>
> Diffs
> -----
>
> kinfocenter/Modules/opengl/opengl.cpp 7df2b17
>
> Diff: http://git.reviewboard.kde.org/r/113779/diff/
>
>
> Testing
> -------
>
> Run KInfocenter on openSUSE, where lspci is in /sbin and that is not in the user's path.
> Without this patch, 3D Accelerator will be shown as "unknown" (because lspci cannot be run, with this patch it works as intended.
> I also tried with lspci in /usr/bin/ (i.e. in the path) and completely removed, worked as expected (correct information in the former case, "unknown" in the latter).
>
>
> Thanks,
>
> Wolfgang Bauer
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131111/31f45663/attachment.htm>
More information about the kde-core-devel
mailing list