1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/low-level.R
3\name{ps_pid}
4\alias{ps_pid}
5\title{Pid of a process handle}
6\usage{
7ps_pid(p = ps_handle())
8}
9\arguments{
10\item{p}{Process handle.}
11}
12\value{
13Process id.
14}
15\description{
16This function works even if the process has already finished.
17}
18\examples{
19\dontshow{if (ps::ps_is_supported() && ! ps:::is_cran_check()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
20p <- ps_handle()
21p
22ps_pid(p)
23ps_pid(p) == Sys.getpid()
24\dontshow{\}) # examplesIf}
25}
26\seealso{
27Other process handle functions:
28\code{\link{ps_children}()},
29\code{\link{ps_cmdline}()},
30\code{\link{ps_connections}()},
31\code{\link{ps_cpu_times}()},
32\code{\link{ps_create_time}()},
33\code{\link{ps_cwd}()},
34\code{\link{ps_descent}()},
35\code{\link{ps_environ}()},
36\code{\link{ps_exe}()},
37\code{\link{ps_handle}()},
38\code{\link{ps_interrupt}()},
39\code{\link{ps_is_running}()},
40\code{\link{ps_kill}()},
41\code{\link{ps_memory_info}()},
42\code{\link{ps_name}()},
43\code{\link{ps_num_fds}()},
44\code{\link{ps_num_threads}()},
45\code{\link{ps_open_files}()},
46\code{\link{ps_ppid}()},
47\code{\link{ps_resume}()},
48\code{\link{ps_send_signal}()},
49\code{\link{ps_shared_libs}()},
50\code{\link{ps_status}()},
51\code{\link{ps_suspend}()},
52\code{\link{ps_terminal}()},
53\code{\link{ps_terminate}()},
54\code{\link{ps_uids}()},
55\code{\link{ps_username}()}
56}
57\concept{process handle functions}
58