replace execvp with system

This commit is contained in:
Markus Gans 2018-09-18 04:22:14 +02:00
parent f3bc5b35f4
commit 0a244298b1
1 changed files with 11 additions and 17 deletions

View File

@ -1950,23 +1950,17 @@ void FTermDetectionTest::debugOutput()
std::cout << std::endl << line << std::endl; std::cout << std::endl << line << std::endl;
// Command line // Command line
char* child_av[] = const char debug_command[] = "/bin/bash -c ' \
{ for i in DSR CURSOR_POS DECID DA DA1 SEC_DA ANSWERBACK \
C_STR("/bin/bash"), TITLE COLOR16 COLOR88 COLOR256; \
C_STR("-c"), do \
C_STR("for i in DSR CURSOR_POS DECID DA DA1 SEC_DA ANSWERBACK \ eval \"echo -en \\\"$i${GO_MIDDLE}\\\"; \
TITLE COLOR16 COLOR88 COLOR256; \ echo -n \\\"\\${$i}\\\"; \
do \ echo -en \\\"${GO_RIGHT}\\${$i}\\\"\"; \
eval \"echo -en \\\"$i${GO_MIDDLE}\\\"; \ sleep 0.5; \
echo -n \\\"\\${$i}\\\"; \ echo -e \"\\r\"; \
echo -en \\\"${GO_RIGHT}\\${$i}\\\"\"; \ done'";
sleep 0.5; \ system(debug_command);
echo -e \"\\r\"; \
done"),
0
};
execvp(child_av[0], child_av);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------