Added 2>&1

This commit is contained in:
retoor 2025-04-03 05:38:30 +02:00
parent a7b45c2d99
commit ee30308081
2 changed files with 8 additions and 0 deletions

BIN
rpylib.so

Binary file not shown.

View File

@ -353,6 +353,14 @@ char *tool_function_linux_terminal(char *command) {
size_t total_size = 0;
char *output = NULL;
char stderr_command[1024] = {0};
if(!strstr(command, "2>")) {
snprintf(stderr_command, sizeof(stderr_command), "%s 2>&1", command);
command = stderr_command;
}
fp = popen(command, "r");
if (fp == NULL) {
perror("popen failed");