Skip to content

Commit

Permalink
[Core] Add kill method to ProcessInfo
Browse files Browse the repository at this point in the history
sebaszm authored and pwielders committed Feb 2, 2021
1 parent b718847 commit 7ce0ff6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/core/ProcessInfo.h
Original file line number Diff line number Diff line change
@@ -237,6 +237,17 @@ namespace Core {
#endif
}

inline void Kill(const bool hardKill)
{
#ifdef __WINDOWS__
if (hardKill == true) {
TerminateProcess(_info.hProcess, 1234);
}
#else
::kill(_pid, (hardKill ? SIGKILL : SIGTERM));
#endif
}

uint64_t Allocated() const;
uint64_t Resident() const;
uint64_t Shared() const;

0 comments on commit 7ce0ff6

Please sign in to comment.