Fixed shutdown issues (#1067)

* Fixed wrong shutdown mode string (must be 'rascsi', not 'piscsi')

* Fixed spurious segfaults in termination handler
This commit is contained in:
Uwe Seimet 2023-01-14 19:26:49 +01:00 committed by GitHub
parent 78206ed670
commit 649655ba40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
//
// Powered by XM6 TypeG Technology.
// Copyright (C) 2016-2020 GIMONS
// Copyright (C) 2020-2022 Contributors to the PiSCSI project
// Copyright (C) 2020-2023 Contributors to the PiSCSI project
//
//---------------------------------------------------------------------------
@ -146,11 +146,11 @@ PbDeviceType Piscsi::ParseDeviceType(const string& value) const
return type;
}
void Piscsi::TerminationHandler(int signum)
void Piscsi::TerminationHandler(int)
{
Cleanup();
exit(signum);
// Process will terminate automatically
}
Piscsi::optargs_type Piscsi::ParseArguments(const vector<char *>& args, int& port) const

View File

@ -5,7 +5,7 @@
//
// Powered by XM6 TypeG Technology.
// Copyright (C) 2016-2020 GIMONS
// Copyright (C) 2020-2022 Contributors to the PiSCSI project
// Copyright (C) 2020-2023 Contributors to the PiSCSI project
//
//---------------------------------------------------------------------------
@ -239,7 +239,7 @@ int ScsiCtl::run(const vector<char *>& args) const
case 'X':
command.set_operation(SHUT_DOWN);
SetParam(command, "mode", "piscsi");
SetParam(command, "mode", "rascsi");
break;
case 'z':