Lines Matching full:process

10 #include "base/process/process_handle.h"
19 #include <lib/zx/process.h>
24 #include "base/process/port_provider_mac.h"
33 // Provides a move-only encapsulation of a process.
35 // This object is not tied to the lifetime of the underlying process: the
36 // process may be killed and this object may still around, and it will still
39 // Windows: The underlying ProcessHandle will be valid after the process dies
40 // and can be used to gather some information about that process, but most
44 // the process dies, and it may be reused by the system, which means that it may
45 // end up pointing to the wrong process.
46 class BASE_EXPORT Process {
50 explicit Process(ProcessHandle handle = kNullProcessHandle);
52 Process(Process&& other);
54 // The destructor does not terminate the process.
55 ~Process();
57 Process& operator=(Process&& other);
59 // Returns an object for the current process.
60 static Process Current();
62 // Returns a Process for the given |pid|.
63 static Process Open(ProcessId pid);
65 // Returns a Process for the given |pid|. On Windows the handle is opened
68 static Process OpenWithExtraPrivileges(ProcessId pid);
71 // Returns a Process for the given |pid|, using some |desired_access|.
73 static Process OpenWithAccess(ProcessId pid, DWORD desired_access);
80 static Process DeprecatedGetProcessFromHandle(ProcessHandle handle);
85 // Terminates the current process immediately with |exit_code|.
88 // Returns true if this objects represents a valid process.
91 // Returns a handle for this process. There is no guarantee about when that
95 // Returns a second object that represents this process.
96 Process Duplicate() const;
98 // Get the PID for this process.
101 // Returns true if this process is the current process.
104 // Close the process handle. This will not terminate the process.
107 // Returns true if this process is still running. This is only safe on Windows
109 // process information available until itself has been released. But on Posix,
117 // Terminates the process with extreme prejudice. The given |exit_code| will
118 // be the exit code of the process. If |wait| is true, this method will wait
119 // for up to one minute for the process to actually terminate.
120 // Returns true if the process terminates within the allowed time.
124 // Waits for the process to exit. Returns true on success.
125 // On POSIX, if the process has been signaled then |exit_code| is set to -1.
126 // On Linux this must be a child process, however on Mac and Windows it can be
127 // any process.
137 // Indicates that the process has exited with the specified |exit_code|.
138 // This should be called if process exit is observed outside of this class.
141 // process though that should be avoided.
145 // The Mac needs a Mach port in order to manipulate a process's priority,
150 // A process is backgrounded when its task priority is
153 // Returns true if the port_provider can locate a task port for the process
157 // Set the process as backgrounded. If value is
160 // priority of the process will be set to TASK_FOREGROUND_APPLICATION.
166 // A process is backgrounded when it's priority is lower than normal.
167 // Return true if this process is backgrounded, false otherwise.
170 // Set a process as backgrounded. If value is true, the priority of the
171 // process will be lowered. If value is false, the priority of the process
172 // will be made "normal" - equivalent to default process priority.
176 // Returns an integer representing the priority of a process. The meaning
182 // If the process is not in a PID namespace or /proc/<pid>/status does not
191 zx::process process_;
200 DISALLOW_COPY_AND_ASSIGN(Process);
206 // process is backgrounded or not.