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