]>
git.saurik.com Git - apple/launchd.git/blob - launchd/src/launch_priv.h
2 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
23 #ifndef _LAUNCH_PRIV_H_
24 #define _LAUNCH_PRIV_H_
26 #define LAUNCH_KEY_GETUSERENVIRONMENT "GetUserEnvironment"
27 #define LAUNCH_KEY_SETUSERENVIRONMENT "SetUserEnvironment"
28 #define LAUNCH_KEY_UNSETUSERENVIRONMENT "UnsetUserEnvironment"
29 #define LAUNCH_KEY_SETSTDOUT "SetStandardOut"
30 #define LAUNCH_KEY_SETSTDERR "SetStandardError"
31 #define LAUNCH_KEY_SHUTDOWN "Shutdown"
32 #define LAUNCH_KEY_GETRESOURCELIMITS "GetResourceLimits"
33 #define LAUNCH_KEY_SETRESOURCELIMITS "SetResourceLimits"
34 #define LAUNCH_KEY_RELOADTTYS "ReloadTTYS"
35 #define LAUNCH_KEY_SETLOGMASK "SetLogMask"
36 #define LAUNCH_KEY_GETLOGMASK "GetLogMask"
37 #define LAUNCH_KEY_SETUMASK "SetUmask"
38 #define LAUNCH_KEY_GETUMASK "GetUmask"
39 #define LAUNCH_KEY_GETRUSAGESELF "GetResourceUsageSelf"
40 #define LAUNCH_KEY_GETRUSAGECHILDREN "GetResourceUsageChildren"
42 #define LAUNCH_KEY_WORKAROUNDBONJOUR "WorkaroundBonjour"
44 #define LAUNCHD_SOCKET_ENV "LAUNCHD_SOCKET"
45 #define LAUNCHD_SOCK_PREFIX "/var/launchd"
46 #define LAUNCHD_TRUSTED_FD_ENV "__LAUNCHD_FD"
47 #define LAUNCHD_ASYNC_MSG_KEY "_AsyncMessage"
48 #define LAUNCH_KEY_BATCHCONTROL "BatchControl"
49 #define LAUNCH_KEY_BATCHQUERY "BatchQuery"
51 typedef struct _launch
*launch_t
;
53 launch_t
launchd_fdopen(int);
54 int launchd_getfd(launch_t
);
55 void launchd_close(launch_t
);
57 launch_data_t
launch_data_new_errno(int);
58 bool launch_data_set_errno(launch_data_t
, int);
60 int launchd_msg_send(launch_t
, launch_data_t
);
61 int launchd_msg_recv(launch_t
, void (*)(launch_data_t
, void *), void *);
63 /* batch jobs will be implicity re-enabled when the last application who
64 * disabled them exits */
65 void launchd_batch_enable(bool);
66 bool launchd_batch_query(void);