]>
Commit | Line | Data |
---|---|---|
ed34e3c3 A |
1 | #ifndef __LAUNCHD_CORE_LOGIC__ |
2 | #define __LAUNCHD_CORE_LOGIC__ | |
3 | /* | |
4 | * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. | |
5 | * | |
6 | * @APPLE_APACHE_LICENSE_HEADER_START@ | |
7 | * | |
8 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
9 | * you may not use this file except in compliance with the License. | |
10 | * You may obtain a copy of the License at | |
11 | * | |
12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
13 | * | |
14 | * Unless required by applicable law or agreed to in writing, software | |
15 | * distributed under the License is distributed on an "AS IS" BASIS, | |
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
17 | * See the License for the specific language governing permissions and | |
18 | * limitations under the License. | |
19 | * | |
20 | * @APPLE_APACHE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | ||
ddbbfbc1 | 23 | #include "launchd_runtime.h" |
ef398931 A |
24 | #include "bootstrap.h" |
25 | #include "launch.h" | |
ed34e3c3 | 26 | |
5b0a4722 A |
27 | typedef struct job_s *job_t; |
28 | typedef struct jobmgr_s *jobmgr_t; | |
ed34e3c3 | 29 | |
5b0a4722 A |
30 | extern jobmgr_t root_jobmgr; |
31 | extern mach_port_t inherited_bootstrap_port; | |
ddbbfbc1 A |
32 | extern mach_port_t g_audit_session_port; |
33 | extern au_asid_t g_audit_session; | |
34 | extern bool g_flat_mach_namespace; | |
35 | extern bool g_embedded_privileged_action; | |
ed34e3c3 | 36 | |
5b0a4722 A |
37 | void jobmgr_init(bool); |
38 | jobmgr_t jobmgr_shutdown(jobmgr_t jm); | |
39 | void jobmgr_dispatch_all_semaphores(jobmgr_t jm); | |
ddbbfbc1 | 40 | void jobmgr_dispatch_all_interested(jobmgr_t jm, job_t j); |
5b0a4722 | 41 | jobmgr_t jobmgr_delete_anything_with_port(jobmgr_t jm, mach_port_t port); |
ed34e3c3 | 42 | |
ed34e3c3 | 43 | launch_data_t job_export_all(void); |
ed34e3c3 | 44 | |
5b0a4722 A |
45 | job_t job_dispatch(job_t j, bool kickstart); /* returns j on success, NULL on job removal */ |
46 | job_t job_find(const char *label); | |
47 | job_t job_find_by_service_port(mach_port_t p); | |
48 | bool job_ack_port_destruction(mach_port_t p); | |
49 | bool job_is_anonymous(job_t j); | |
50 | launch_data_t job_export(job_t j); | |
51 | void job_stop(job_t j); | |
52 | void job_checkin(job_t j); | |
53 | void job_remove(job_t j); | |
ddbbfbc1 | 54 | bool job_is_god(job_t j); |
5b0a4722 A |
55 | job_t job_import(launch_data_t pload); |
56 | launch_data_t job_import_bulk(launch_data_t pload); | |
57 | job_t job_mig_intran(mach_port_t mp); | |
58 | void job_mig_destructor(job_t j); | |
59 | void job_ack_no_senders(job_t j); | |
60 | void job_log(job_t j, int pri, const char *msg, ...) __attribute__((format(printf, 3, 4))); | |
ddbbfbc1 A |
61 | void job_set_pid_crashed(pid_t p); |
62 | ||
63 | int launchd_set_jetsam_priorities(launch_data_t priorities); | |
ed34e3c3 A |
64 | |
65 | #endif |