Missing Validation of Pipe Return Value

This commit is contained in:
2025-12-07 20:30:36 +01:00
parent c7d37b1d95
commit 2ca0b8b061

View File

@ -43,8 +43,15 @@ void reHDD::app_logic(void)
ui = new TUI();
ui->initTUI();
pipe(fdNewDrivesInformPipe);
pipe(fdShredInformPipe);
if (pipe(fdNewDrivesInformPipe) == -1)
{
Logger::logThis()->error("Unable to open pipe 'fdNewDrivesInformPipe'");
}
if (pipe(fdShredInformPipe) == -1)
{
Logger::logThis()->error("Unable to open pipe 'fdShredInformPipe'");
}
thread thDevices(ThreadScanDevices); // start thread that scans for drives
thread thUserInput(ThreadUserInput); // start thread that reads user input