#ifndef _DW_DFORK_H
#define _DW_DFORK_H

/*--------------------------------------------------------------------------
 *  Copyright (c) 2001-2004 Igor Daniloff. 
 *	All rights reserved.
 *
 * By using this file, you agree to the terms and conditions set
 * forth in the LICENSE file which can be found at this directory.
 *------------------------------------------------------------------------*/
 
/* $Id: dw_dfork.h,v 1.10 2004/01/12 17:24:52 cvser Exp $ */

#if !defined(__WIN32_DW)

#include "dwc_type.h"

#if defined(DW_COURIER) || defined(DW_SAMBA) || ((defined(Linux_DW) || defined(EMX_DW)) && (defined(DW_CGP) || defined(DW_MIO)))
typedef void*   dw_routine_arg_t;
typedef void  (*dw_routine_t)(dw_routine_arg_t);

extern dwc_pid_t        dw_dfork( dw_routine_t          routine, 
                                  dw_routine_t          fail_routine,
                                  dw_routine_arg_t      argument );
#endif /* COURIER or SAMBA or ((Linux or EMX) and (CGP or MIO)) */
extern dwc_syserr_t     dw_wait(  dwc_pid_t             pid, 
                                  dwc_bool_t            waiting, 
                                  dwc_string_t          name );
#if !defined(DW_SAMBA)
extern dwc_syserr_t     dw_popen( dwc_path_t            path, 
                                  dwc_string_t const    pipe_argv[], 
                                  dwc_fd_t              fd[] );
#endif /* not SAMBA */
#endif /* not WIN32 */

#endif /* _DW_DFORK_H */
