Reece
e5e36bd887
[*] Fix deadlock in the async subsystem (NoLockShutdown vs Shutdown in exception handler) [+] Added ProccessMap NT variant [+] Added ToolHelp image profiling [*] Improved exception awareness [*] Delegated SpawnThread to isolated TU, ready for reuse for RunAs and XNU Open - now with horrible evil alloc that could fail [+] Added header for future api 'UtilRun' [*] Improve NT core detection [*] Changed small affinity bitmap to AuUInt64 instead of AuUInt32 [+] Added data structure to hold cpuids/affinity masks [+] Implemented logger sinks [+] Implemented logger glue logic [*] Began migrating older loggers to sink-based default devices [*] Minor refactors [*] Improved internal exception discarding, not yet nothrow capable [*] Minor create directory fix
32 lines
987 B
C++
32 lines
987 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: UtilRun.hpp
|
|
Date:
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Processes
|
|
{
|
|
AUKN_INTERFACE(ICommandFinished,
|
|
AUI_METHOD(void, OnLines, (const AuList<AuString> &, buffer)),
|
|
AUI_METHOD(void, OnBuffered, (const Memory::ByteBuffer &, buffer))
|
|
);
|
|
|
|
struct CommandRun_s
|
|
{
|
|
AuString cmd;
|
|
AuList<AuString> args;
|
|
Memory::ByteBuffer stdIn;
|
|
bool stdOutLongerThan64k {false}; // common constraint on linux and windows, at the very least. linux -> max pipe = 16k, windows -> 16k minimum guaranteed
|
|
bool stdOutIsText {true};
|
|
bool runCallbackOnRandomThread {true};
|
|
bool runCallbackOnWorkerPId {};
|
|
Async::WorkerPId_t worker;
|
|
bool syncToResult {}; // default -> async
|
|
AuSPtr<ICommandFinished> callback;
|
|
};
|
|
|
|
AUKN_SYM void RunCommand(const CommandRun_s &in);
|
|
} |