blob: 5351302965045dda46d109e84a68fb5dddb15231 [file] [log] [blame]
Colin Cross9c5366b2010-04-13 19:48:59 -07001/*
2 * Copyright (C) 2010 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
Luis Hector Chavez9f97f472017-09-06 13:43:57 -070017#ifndef _INIT_SIGCHLD_HANDLER_H_
18#define _INIT_SIGCHLD_HANDLER_H_
Colin Cross9c5366b2010-04-13 19:48:59 -070019
Nikita Ioffe3f4b0d62019-10-09 15:23:02 +010020#include <chrono>
Bart Van Assche9c6b7232023-11-20 14:38:55 -080021#include <set>
Nikita Ioffe3f4b0d62019-10-09 15:23:02 +010022#include <vector>
23
Tom Cherry81f5d3e2017-06-22 12:53:17 -070024namespace android {
25namespace init {
26
Bart Van Assche9c6b7232023-11-20 14:38:55 -080027std::set<pid_t> ReapAnyOutstandingChildren();
Tom Cherryeeee8312017-07-28 15:22:23 -070028
Bart Van Asschea75f2102023-11-03 10:33:17 -070029void WaitToBeReaped(int sigchld_fd, const std::vector<pid_t>& pids,
30 std::chrono::milliseconds timeout);
Nikita Ioffe3f4b0d62019-10-09 15:23:02 +010031
Tom Cherry81f5d3e2017-06-22 12:53:17 -070032} // namespace init
33} // namespace android
34
Colin Cross9c5366b2010-04-13 19:48:59 -070035#endif