summaryrefslogtreecommitdiffstats
path: root/posix1003_1/process_environment.rst
blob: c9ddae6936daa977c292359011032ab0657e5478 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
Process Environment
###################

Process Identification
======================

Get Process and Parent Process IDs
----------------------------------

.. code:: c

    getpid(), Function, Implemented, SUSP Functionality
    getppid(), Function, Implemented, SUSP Functionality

User Identification
===================

Get Real User Effective User Real Group and Effective Group IDs
---------------------------------------------------------------

.. code:: c

    getuid(), Function, Implemented, SUSP Functionality
    geteuid(), Function, Implemented, SUSP Functionality
    getgid(), Function, Implemented, SUSP Functionality
    getegid(), Function, Implemented, SUSP Functionality

Set User and Group IDs
----------------------

.. code:: c

    setuid(), Function, Implemented, SUSP Functionality
    setgid(), Function, Implemented, SUSP Functionality

Get Supplementary Group IDs
---------------------------

.. code:: c

    getgroups(), Function, Implemented, SUSP Functionality

Get User Name
-------------

.. code:: c

    getlogin(), Function, Implemented, SUSP Functionality
    getlogin_r(), Function, Implemented, SUSP Functionality

Process Groups
==============

Get Process Group ID
--------------------

.. code:: c

    getpgrp(), Function, Implemented, SUSP Functionality

Create Session and Set Process Group ID
---------------------------------------

.. code:: c

    setsid(), Function, Implemented, SUSP Functionality

Set Process Group ID for Job Control
------------------------------------

.. code:: c

    setpgid(), Function, Dummy Implementation

System Identification
=====================

Get System Name
---------------

.. code:: c

    struct utsname, Type, Implemented
    uname(), Function, Implemented

Time
====

Get System Time
---------------

.. code:: c

    time(), Function, Implemented

Get Process Times
-----------------

.. code:: c

    struct tms, Type, Implemented
    times(), Function, Implemented

NOTE: ``times`` always returns 0 for tms_stime, tms_cutime, and
tms_cstime fields of the ``struct tms`` returned.

Environment Variables
=====================

Environment Access
------------------

.. code:: c

    getenv(), Function, Implemented

Terminal Identification
=======================

Generate Terminal Pathname
--------------------------

.. code:: c

    ctermid(), Function, Implemented

Determine Terminal Device Name
------------------------------

.. code:: c

    ttyname(), Function, Implemented, untested
    ttyname_r(), Function, Implemented, untested
    isatty(), Function, Implemented

Configurable System Variables
=============================

Get Configurable System Variables
---------------------------------

.. code:: c

    sysconf(), Function, Dummy Implementation
    _SC_AIO_LISTIO_MAX, Constant, Implemented
    _SC_AIO_MAX, Constant, Implemented
    _SC_AIO_PRIO_DELTA_MAX, Constant, Implemented
    _SC_ARG_MAX, Constant, Implemented
    _SC_CHILD_MAX, Constant, Implemented
    _SC_CLK_TCK, Constant, Implemented
    CLK_TCK, Constant, Implemented
    _SC_DELAYTIMER_MAX, Constant, Implemented
    _SC_GETGR_R_SIZE_MAX, Constant, Implemented
    _SC_GETPW_R_SIZE_MAX, Constant, Implemented
    _SC_LOGIN_NAME_MAX, Constant, Implemented
    _SC_MQ_OPEN_MAX, Constant, Implemented
    _SC_MQ_PRIO_MAX, Constant, Implemented
    _SC_NGROUPS_MAX, Constant, Implemented
    _SC_OPEN_MAX, Constant, Implemented
    _SC_PAGESIZE, Constant, Implemented
    _SC_RTSIG_MAX, Constant, Implemented
    _SC_SEM_NSEMS_MAX, Constant, Implemented
    _SC_SEM_VALUE_MAX, Constant, Implemented
    _SC_SIGQUEUE_MAX, Constant, Implemented
    _SC_STREAM_MAX, Constant, Implemented
    _SC_THREAD_DESTRUCTOR_ITERATIONS, Constant, Implemented
    _SC_THREAD_KEYS_MAX, Constant, Implemented
    _SC_THREAD_STACK_MIN, Constant, Implemented
    _SC_THREAD_THREADS_MAX, Constant, Implemented
    _SC_TIMER_MAX, Constant, Implemented
    _SC_TTY_NAME_MAX, Constant, Implemented
    _SC_TZNAME_MAX, Constant, Implemented
    _SC_ASYNCHRONOUS_IO, Constant, Implemented
    _SC_FSYNC, Constant, Implemented
    _SC_JOB_CONROL, Constant, Implemented
    _SC_MAPPED_FILES, Constant, Implemented
    _SC_MEMLOCK, Constant, Implemented
    _SC_MEMLOCK_RANGE, Constant, Implemented
    _SC_MEMORY_PROTECTION, Constant, Implemented
    _SC_MESSAGE_PASSING, Constant, Implemented
    _SC_PRIORITIZED_IO, Constant, Implemented
    _SC_PRIORITY_SCHEDULING, Constant, Unimplemented
    _SC_REALTIME_SIGNALS, Constant, Implemented
    _SC_SAVED_IDS, Constant, Implemented
    _SC_SEMAPHORES, Constant, Implemented
    _SC_SHARED_MEMORY_OBJECTS, Constant, Implemented
    _SC_SYNCHRONIZED_IO, Constant, Implemented
    _SC_TIMERS, Constant, Implemented
    _SC_THREADS, Constant, Implemented
    _SC_THREAD_ATTR_STACKADDR, Constant, Implemented
    _SC_THREAD_ATTR_STACKSIZE, Constant, Implemented
    _SC_THREAD_PRIORITY_SCHEDULING, Constant, Implemented
    _SC_THREAD_PRIO_INHERIT, Constant, Implemented
    _SC_THREAD_PRIO_PROTECT, Constant, Unimplemented
    _SC_THREAD_PROCESS_SHARED, Constant, Implemented
    _SC_THREAD_SAFE_FUNCTIONS, Constant, Implemented
    _SC_VERSION, Constant, Implemented

.. COMMENT: COPYRIGHT (c) 1988-2002.

.. COMMENT: On-Line Applications Research Corporation (OAR).

.. COMMENT: All rights reserved.