Skip to content

Commit

Permalink
Ignoring sigpipes because libuv sucks.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble committed Dec 22, 2024
1 parent e9dec5f commit 2087f98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ int pcsxMain(int argc, char **argv) {
PCSX::g_system = system;
auto sigint = std::signal(SIGINT, [](auto signal) { PCSX::g_system->quit(-1); });
auto sigterm = std::signal(SIGTERM, [](auto signal) { PCSX::g_system->quit(-1); });
#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
#endif

Check warning on line 200 in src/main/main.cc

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

pcsxMain already has high cyclomatic complexity, and now it increases in Lines of Code from 233 to 236. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
const auto &logfileArgOpt = args.get<std::string>("logfile");
const PCSX::u8string logfileArg = MAKEU8(logfileArgOpt.has_value() ? logfileArgOpt->c_str() : "");
if (!logfileArg.empty()) system->useLogfile(logfileArg);
Expand Down

0 comments on commit 2087f98

Please sign in to comment.