MeVisLab Toolbox Reference
macProcess.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2010, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef MAC_PROCESS_H
14 #define MAC_PROCESS_H
15 
17 
18 #if defined(__APPLE__)
19 
21 #include <macSysCtl.h>
22 #include <sys/types.h>
23 
24 namespace macos {
25 
28  {
29  public:
30 
32  static pid_t getppid(pid_t pid);
33 
35  static bool isTranslated() {
36  return SysCtl::boolByName("sysctl.proc_translated");
37  }
38 
39  };
40 
41 }
42 
43 #endif // __APPLE__
44 #endif // __macProcess_H
Process related functions.
Definition: macProcess.h:28
static pid_t getppid(pid_t pid)
Returns the process ID of the parent of the process with the given process id.
static bool isTranslated()
Determine if a process is running under Rosetta translation.
Definition: macProcess.h:35
static bool boolByName(const char *option)
#define OSXSUPPORT_PUBLIC_API
Symbol visibility macros.
AppleScript support.