From cd7f4bc79c33afcfcb8864df021cfb7681f7467a Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 25 Nov 2014 11:31:30 +0100 Subject: [PATCH] CShellWindow: use internal debug functionality, set init value for pid --- src/gui/widget/shellwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 1f7f27b1a..a414aeaa7 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -43,6 +43,7 @@ #include #include #include +#include CShellWindow::CShellWindow(const std::string &Command, const int Mode, int *Res) { @@ -67,18 +68,21 @@ void CShellWindow::exec() *res = r; else *res = WEXITSTATUS(r); + dprintf(DEBUG_NORMAL, "[CShellWindow] [%s - %d] Error! system returns: %d command: %s\n", __func__, __LINE__, *res, cmd.c_str()); } return; } - pid_t pid; + pid_t pid = 0; cmd = command + " 2>&1"; FILE *f = my_popen(pid, cmd.c_str(), "r"); if (!f) { if (res) *res = -1; + dprintf(DEBUG_NORMAL, "[CShellWindow] [%s - %d] Error! my_popen returns: %d command: %s\n", __func__, __LINE__, *res, cmd.c_str()); return; } + Font *font = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_INFO]; unsigned int lines_max = frameBuffer->getScreenHeight() / font->getHeight(); list lines;