Stroika Library
3.0d25
Help-Home
Loading...
Searching...
No Matches
Foundation/Execution/Process.h
1
/*
2
* Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3
*/
4
#ifndef _Stroika_Foundation_Execution_Process_h_
5
#define _Stroika_Foundation_Execution_Process_h_ 1
6
7
#include "Stroika/Foundation/StroikaPreComp.h"
8
9
#include <mutex>
10
11
#if qStroika_Platform_POSIX
12
#include <sys/types.h>
13
#include <unistd.h>
14
#elif qStroika_Platform_Windows
15
#include <Windows.h>
16
#include <process.h>
17
#endif
18
19
#include "Stroika/Foundation/Common/Common.h"
20
21
namespace
Stroika::Foundation::Execution
{
22
23
#if qStroika_Platform_POSIX
24
using
pid_t = ::pid_t;
25
#elif qStroika_Platform_Windows
26
using
pid_t = DWORD;
27
#else
28
using
pid_t = int;
29
#endif
30
31
pid_t GetCurrentProcessID ();
32
33
/**
34
* Return true, if the pid can be verified to be running, false if verified not running.
35
* \note This obviously can be a race as processes can come and go quickly
36
*/
37
bool
IsProcessRunning
(pid_t pid);
38
39
}
40
41
/*
42
********************************************************************************
43
***************************** Implementation Details ***************************
44
********************************************************************************
45
*/
46
#include "Process.inl"
47
48
#endif
/*_Stroika_Foundation_Execution_Process_h_*/
Stroika::Foundation::Execution
Definition
SDKString.inl:7
Stroika::Foundation::Execution::IsProcessRunning
bool IsProcessRunning(pid_t pid)
Definition
Foundation/Execution/Process.cpp:23
Library
Sources
Stroika
Foundation
Execution
Process.h
Generated by
1.9.8