Change Details
src/linkapp.cpp |
590 | 590 | string command = exec; |
591 | 591 | |
592 | 592 | if (!params.empty()) command += " " + params; |
| 593 | |
| 594 | if (gmenu2x->confInt["outputLogs"] |
593 | 595 | #if defined(PLATFORM_A320) || defined(PLATFORM_GCW0) |
594 | | if (gmenu2x->confInt["outputLogs"] && !consoleApp) |
595 | | command += " &> " LOG_FILE; |
596 | | #else |
597 | | if (gmenu2x->confInt["outputLogs"]) |
598 | | command += " &> " LOG_FILE; |
| 596 | && !consoleApp |
599 | 597 | #endif |
| 598 | ) { |
| 599 | int fd = open(LOG_FILE, O_WRONLY | O_TRUNC | O_CREAT, 0644); |
| 600 | if (fd < 0) { |
| 601 | ERROR("Unable to open log file for write: %s\n", LOG_FILE); |
| 602 | } else { |
| 603 | fflush(stdout); |
| 604 | dup2(fd, STDOUT_FILENO); |
| 605 | dup2(fd, STDERR_FILENO); |
| 606 | close(fd); |
| 607 | } |
| 608 | } |
600 | 609 | |
601 | 610 | gmenu2x->saveSelection(); |
602 | 611 | |
Download the corresponding diff file