T-Box Basic dev
Loading...
Searching...
No Matches
init.h
1/*
2 * Copyright (C) 2007 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/* clang-format off */
18#ifndef _INIT_INIT_H
19#define _INIT_INIT_H
20
21#include <sys/stat.h>
22
23typedef int pid_t;
24
25void handle_control_message(const char *msg, const char *arg);
26
27#define SVC_DISABLED 0x01 /* do not autostart with class */
28#define SVC_ONESHOT 0x02 /* do not restart on exit */
29#define SVC_RUNNING 0x04 /* currently active */
30#define SVC_RESTARTING 0x08 /* waiting to restart */
31#define SVC_CONSOLE 0x10 /* requires console */
32#define SVC_CRITICAL 0x20 /* will reboot into recovery if keeps crashing */
33#define SVC_RESET 0x40 /* Use when stopping a process, but not disabling
34 so it can be restarted with its class */
35#define SVC_RC_DISABLED 0x80 /* Remember if the disabled flag was set in the rc script */
36#define SVC_RESTART 0x100 /* Use to safely restart (stop, wait, start) a service */
37
38#define NR_SVC_SUPP_GIDS 12 /* twelve supplementary groups */
39
40#define COMMAND_RETRY_TIMEOUT 5
41
42int property_main(void);
43
44#endif /* _INIT_INIT_H */
45/* clang-format on */