1caf54c4fSMartin Matuska /*-
2caf54c4fSMartin Matuska  * Copyright (c) 2007 Joerg Sonnenberger
3caf54c4fSMartin Matuska  * All rights reserved.
4caf54c4fSMartin Matuska  *
5caf54c4fSMartin Matuska  * Redistribution and use in source and binary forms, with or without
6caf54c4fSMartin Matuska  * modification, are permitted provided that the following conditions
7caf54c4fSMartin Matuska  * are met:
8caf54c4fSMartin Matuska  * 1. Redistributions of source code must retain the above copyright
9caf54c4fSMartin Matuska  *    notice, this list of conditions and the following disclaimer.
10caf54c4fSMartin Matuska  * 2. Redistributions in binary form must reproduce the above copyright
11caf54c4fSMartin Matuska  *    notice, this list of conditions and the following disclaimer in the
12caf54c4fSMartin Matuska  *    documentation and/or other materials provided with the distribution.
13caf54c4fSMartin Matuska  *
14caf54c4fSMartin Matuska  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR
15caf54c4fSMartin Matuska  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16caf54c4fSMartin Matuska  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17caf54c4fSMartin Matuska  * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
18caf54c4fSMartin Matuska  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19caf54c4fSMartin Matuska  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20caf54c4fSMartin Matuska  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21caf54c4fSMartin Matuska  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22caf54c4fSMartin Matuska  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23caf54c4fSMartin Matuska  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24caf54c4fSMartin Matuska  */
25caf54c4fSMartin Matuska 
26f9762417SMartin Matuska #ifndef FILTER_FORK_H
27f9762417SMartin Matuska #define FILTER_FORK_H
28f9762417SMartin Matuska 
29caf54c4fSMartin Matuska #ifndef __LIBARCHIVE_BUILD
30caf54c4fSMartin Matuska #error This header is only to be used internally to libarchive.
31caf54c4fSMartin Matuska #endif
32caf54c4fSMartin Matuska 
33de6fa6b4SMartin Matuska int
34de6fa6b4SMartin Matuska __archive_create_child(const char *cmd, int *child_stdin, int *child_stdout,
35de6fa6b4SMartin Matuska #if defined(_WIN32) && !defined(__CYGWIN__)
36de6fa6b4SMartin Matuska 	HANDLE *out_child);
37de6fa6b4SMartin Matuska #else
38de6fa6b4SMartin Matuska 	pid_t *out_child);
39de6fa6b4SMartin Matuska #endif
40caf54c4fSMartin Matuska 
41caf54c4fSMartin Matuska void
42caf54c4fSMartin Matuska __archive_check_child(int in, int out);
43caf54c4fSMartin Matuska 
44caf54c4fSMartin Matuska #endif
45