]> git.saurik.com Git - apple/launchd.git/blame - src/job.defs
launchd-842.92.1.tar.gz
[apple/launchd.git] / src / job.defs
CommitLineData
5b0a4722
A
1/*
2 * Copyright (c) 1999-2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20/*
21 * bootstrap -- fundamental service initiator and port server
22 * Mike DeMoney, NeXT, Inc.
23 * Copyright, 1990. All rights reserved.
24 */
25
eabd1701 26subsystem job 400;
5b0a4722
A
27
28#include <mach/std_types.defs>
29#include <mach/mach_types.defs>
eabd1701 30#include "job_types.defs"
ef398931
A
31import "vproc.h";
32import "vproc_priv.h";
33import "vproc_internal.h";
5b0a4722 34
5b0a4722
A
35userprefix vproc_mig_;
36serverprefix job_mig_;
37
dcace88f
A
38routine
39create_server(
40 j : job_t;
41 servercmd : cmd_t;
42 serveruid : uid_t;
43 ondemand : boolean_t;
44out serverport : mach_port_make_send_t
45);
46
47routine
48reboot2(
49 j : job_t;
50 flags : uint64_t
51);
52
53routine
54check_in2(
55 j : job_t;
56 servicename : name_t;
57out serviceport : mach_port_move_receive_t;
58out instanceid : uuid_t;
59 flags : uint64_t
60);
61
62routine
63register2(
64 j : job_t;
65 servicename : name_t;
66 serviceport : mach_port_t;
67 flags : uint64_t
68);
69
70routine
71look_up2(
72 j : job_t;
73sreplyport rp : mach_port_make_send_once_t;
74 servicename : name_t;
75out serviceport : mach_port_t;
76UserAuditToken servercreds : audit_token_t;
77 targetpid : pid_t;
78 instanceid : uuid_t;
79 flags : uint64_t
80);
81
82routine
83send_signal(
84 j : job_t;
85sreplyport rp : mach_port_make_send_once_t;
86 label : name_t;
87 sig : integer_t
88);
89
90routine
91parent(
92 j : job_t;
93sreplyport rp : mach_port_make_send_once_t;
94out parentport : mach_port_make_send_t
95);
96
97routine
98post_fork_ping(
99 j : job_t;
100 taskport : task_t;
101out asport : mach_port_t
102);
103
104routine
105info(
106 j : job_t;
107out names : name_array_t, dealloc;
108out jobs : name_array_t, dealloc;
109out actives : bootstrap_status_array_t, dealloc;
110 flags : uint64_t
111);
112
113routine
114subset(
115 j : job_t;
116 reqport : mach_port_t;
117out subsetport : mach_port_make_send_t
118);
119
eabd1701 120skip; /* Formerly setup_shmem. */
dcace88f
A
121
122routine
123take_subset(
124 j : job_t;
125out reqport : mach_port_move_send_t;
126out recvport : mach_port_move_receive_t;
127out jobs : pointer_t, dealloc;
128out ports : mach_port_move_send_array_t, dealloc
129);
130
131routine
132getsocket(
133 j : job_t;
134out sockpath : name_t
135);
136
137skip; /* Formerly spawn. */
138
139skip; /* Formerly wait. */
140
141skip; /* Formerly uncork_fork. */
142
143routine
144swap_integer(
145 j : job_t;
146 inkey : vproc_gsk_t;
147 outkey : vproc_gsk_t;
148 inval : int64_t;
149out outval : int64_t
150);
151
152routine
153log(
154 j : job_t;
155 pri : integer_t;
156 err : integer_t;
157 message : logmsg_t
158);
159
160routine
161lookup_per_user_context(
162 j : job_t;
163 uid : uid_t;
164out userbport : mach_port_t
165);
166
167routine
168move_subset(
169 j : job_t;
170 targetport : mach_port_t;
171 session : name_t;
172 asport : mach_port_t;
173 flags : uint64_t
174);
175
176routine
177swap_complex(
178 j : job_t;
179 inkey : vproc_gsk_t;
180 outkey : vproc_gsk_t;
181 inval : pointer_t;
182out outval : pointer_t, dealloc
183);
184
185routine
186log_drain(
187 j : job_t;
188sreplyport rp : mach_port_make_send_once_t;
189out outval : pointer_t, dealloc
190);
191
192routine
193log_forward(
194 j : job_t;
195 inval : pointer_t
196);
197
198routine
199kickstart(
200 j : job_t;
201 label : name_t;
202out pid : pid_t;
203 flags : natural_t
204);
205
eabd1701 206skip; /* Formerly embedded_wait. */
dcace88f
A
207
208routine
209lookup_children(
210 j : job_t;
211out childports : mach_port_move_send_array_t, dealloc;
212out childnames : name_array_t, dealloc;
213out childprops : bootstrap_property_array_t, dealloc
214);
215
216routine
217switch_to_session(
218 j : job_t;
219 reqport : mach_port_t;
220 session : name_t;
221 asport : mach_port_t;
222out newbsport : mach_port_make_send_t
223);
224
eabd1701
A
225skip; /* Formerly transaction_count_for_pid. */
226
dcace88f
A
227routine
228pid_is_managed(
229 j : job_t;
230 pid : pid_t;
231out managed : boolean_t
232);
233
234routine
235port_for_label(
236 j : job_t;
237 label : name_t;
238out jport : mach_port_make_send_t
239);
240
241routine
242init_session(
243 j : job_t;
244 session : name_t;
245 asport : mach_port_t
246);
247
248routine
249set_security_session(
250 j : job_t;
251 uuid : uuid_t;
252 asport : mach_port_t
253);
254
255skip; /* Formerly wait2. */
256
eabd1701 257skip; /* Formerly event_source_check_in. */
dcace88f 258
eabd1701 259skip; /* Formerly event_set_state. */
dcace88f
A
260
261routine
262spawn2(
263 j : job_t;
264sreplyport rp : mach_port_make_send_once_t;
265 job : pointer_t;
266 asport : mach_port_t;
267out outpid : pid_t;
268out obsrvport : mach_port_move_receive_t
269);
270
271routine
272get_root_bootstrap(
273 j : job_t;
274out rootbs : mach_port_move_send_t
275);
eabd1701
A
276
277routine
278legacy_ipc_request(
279 j : job_t;
280 request : pointer_t;
281 request_fds : mach_port_move_send_array_t;
282out reply : pointer_t, dealloc;
283out reply_fds : mach_port_move_send_array_t, dealloc;
284 asport : mach_port_t
285);
95379394
A
286
287routine
288get_listener_port_rights(
289 j : job_t;
290out sports : mach_port_make_send_array_t, dealloc
291);
292
293routine
294register_gui_session(
295 j : job_t;
296 asport : mach_port_t
297);