1 | /* $Id: winchildren.h 3172 2018-03-21 14:21:23Z bird $ */
|
---|
2 | /** @file
|
---|
3 | * Child process creation and management for kmk.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (c) 2018 knut st. osmundsen <[email protected]>
|
---|
8 | *
|
---|
9 | * This file is part of kBuild.
|
---|
10 | *
|
---|
11 | * kBuild is free software; you can redistribute it and/or modify
|
---|
12 | * it under the terms of the GNU General Public License as published by
|
---|
13 | * the Free Software Foundation; either version 3 of the License, or
|
---|
14 | * (at your option) any later version.
|
---|
15 | *
|
---|
16 | * kBuild is distributed in the hope that it will be useful,
|
---|
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | * GNU General Public License for more details.
|
---|
20 | *
|
---|
21 | * You should have received a copy of the GNU General Public License
|
---|
22 | * along with kBuild. If not, see <http://www.gnu.org/licenses/>
|
---|
23 | *
|
---|
24 | */
|
---|
25 |
|
---|
26 | #ifndef INCLUDED_WINCHILDREN_H
|
---|
27 | #define INCLUDED_WINCHILDREN_H
|
---|
28 |
|
---|
29 |
|
---|
30 | void MkWinChildInit(unsigned int cJobSlot);
|
---|
31 | void MkWinChildReExecMake(char **papszArgs, char **papszEnv);
|
---|
32 | intptr_t MkWinChildGetCompleteEventHandle(void);
|
---|
33 | int MkWinChildCreate(char **papszArgs, char **papszEnv, const char *pszShell, struct child *pMkChild, pid_t *pPid);
|
---|
34 | int MkWinChildCreateWithStdOutPipe(char **papszArgs, char **papszEnv, int fdErr, pid_t *pPid, int *pfdReadPipe);
|
---|
35 | #ifdef KMK
|
---|
36 | struct KMKBUILTINENTRY;
|
---|
37 | int MkWinChildCreateBuiltIn(struct KMKBUILTINENTRY const *pBuiltIn, int cArgs, char **papszArgs,
|
---|
38 | char **papszEnv, struct child *pMkChild, pid_t *pPid);
|
---|
39 | int MkWinChildCreateAppend(const char *pszFilename, char **ppszAppend, size_t cbAppend, int fTruncate,
|
---|
40 | struct child *pMkChild, pid_t *pPid);
|
---|
41 | int MkWinChildCreateSubmit(intptr_t hEvent, void *pvSubmitWorker, pid_t *pPid);
|
---|
42 | int MkWinChildCreateRedirect(intptr_t hProcess, pid_t *pPid);
|
---|
43 | #endif
|
---|
44 | int MkWinChildKill(pid_t pid, int iSignal, struct child *pMkChild);
|
---|
45 | int MkWinChildWait(int fBlock, pid_t *pPid, int *piExitCode, int *piSignal, int *pfCoreDumped, struct child **ppMkChild);
|
---|
46 | void MkWinChildExclusiveAcquire(void);
|
---|
47 | void MkWinChildExclusiveRelease(void);
|
---|
48 |
|
---|
49 | #undef CLOSE_ON_EXEC
|
---|
50 | #define CLOSE_ON_EXEC(a_fd) MkWinChildUnrelatedCloseOnExec(a_fd)
|
---|
51 | int MkWinChildUnrelatedCloseOnExec(int fd);
|
---|
52 |
|
---|
53 | #endif
|
---|
54 |
|
---|