mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
22 lines
641 B
C++
22 lines
641 B
C++
#include "prx/libc/include/Api.hpp"
|
|
#include "prx/libc/include/general/VabiMacros.hpp"
|
|
#include <cstdlib>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
|
|
static void Require(bool value) { if (!value) std::abort(); }
|
|
static bool ReportsNotImplemented(int noChdir, int noClose) {
|
|
try {
|
|
daemon_nid_postfix(noChdir, noClose);
|
|
|
|
} catch (const std::runtime_error& error) {
|
|
return std::string(error.what()) == "daemon: forking into the background not implemented";
|
|
}
|
|
return false;
|
|
}
|
|
int main() {
|
|
Require(ReportsNotImplemented(1, 0));
|
|
Require(ReportsNotImplemented(0, 0));
|
|
Require(ReportsNotImplemented(1, 1));
|
|
}
|