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,11 +1950,8 @@ 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"),
C_STR("-c"),
C_STR("for i in DSR CURSOR_POS DECID DA DA1 SEC_DA ANSWERBACK \
TITLE COLOR16 COLOR88 COLOR256; \ TITLE COLOR16 COLOR88 COLOR256; \
do \ do \
eval \"echo -en \\\"$i${GO_MIDDLE}\\\"; \ eval \"echo -en \\\"$i${GO_MIDDLE}\\\"; \
@ -1962,11 +1959,8 @@ void FTermDetectionTest::debugOutput()
echo -en \\\"${GO_RIGHT}\\${$i}\\\"\"; \ echo -en \\\"${GO_RIGHT}\\${$i}\\\"\"; \
sleep 0.5; \ sleep 0.5; \
echo -e \"\\r\"; \ echo -e \"\\r\"; \
done"), done'";
0 system(debug_command);
};
execvp(child_av[0], child_av);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------