mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 13:20:28 -05:00
Add new os_kill
This commit is contained in:
parent
18f5f99cad
commit
5da9b81d58
3 changed files with 25 additions and 0 deletions
12
os/mingw.c
12
os/mingw.c
|
|
@ -2774,6 +2774,18 @@ int os_term(pid_t pid)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int os_kill(pid_t pid)
|
||||
{
|
||||
HANDLE h = (void*)pid;
|
||||
|
||||
if (!TerminateProcess(h, 1)) {
|
||||
windows_errno(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int os_command(const char* command, const char* run_as_user, const char* stdin_text)
|
||||
{
|
||||
wchar_t conv[CONV_MAX];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue