This commit is contained in:
Pan Qiancheng 2025-03-26 17:00:00 +08:00
parent 4e9c962eaf
commit d71a7c8bbc
2 changed files with 10 additions and 10 deletions

View File

@ -166,18 +166,18 @@ void duplicate_output_to_log() {
}
if (has_error) {
char response[10];
printf("\n检测到命令执行出错,是否立即上报BM论坛(Y/N): ");
// char response[10];
printf("\n检测到命令执行出错,已经上报北冥论坛~ ");
fflush(stdout); // 确保提示文字被输出
if (fgets(response, sizeof(response), stdin) != NULL) {
response[strcspn(response, "\n")] = '\0'; // 去掉换行符
if (response[0] == 'Y' || response[0] == 'y') {
printf("上报成功\n");
} else {
printf("取消上报\n");
}
}
// if (fgets(response, sizeof(response), stdin) != NULL) {
// response[strcspn(response, "\n")] = '\0'; // 去掉换行符
// if (response[0] == 'Y' || response[0] == 'y') {
// printf("上报成功\n");
// } else {
// printf("取消上报\n");
// }
// }
}
close(pipe_fds[0]);

Binary file not shown.