1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
// Copyright 2005 Ben Hutchings <ben@decadent.org.uk>.
// See the file "COPYING" for licence details.
#ifndef INC_AUTO_PROC_HPP
#define INC_AUTO_PROC_HPP
#include <sys/types.h>
#include "auto_handle.hpp"
struct auto_proc_factory
{
pid_t operator()() const { return -1; }
};
struct auto_kill_proc_closer
{
void operator()(pid_t pid) const;
};
typedef auto_handle<pid_t, auto_kill_proc_closer, auto_proc_factory>
auto_kill_proc;
struct auto_wait_proc_closer
{
void operator()(pid_t pid) const;
};
typedef auto_handle<pid_t, auto_wait_proc_closer, auto_proc_factory>
auto_wait_proc;
#endif // !INC_AUTO_PROC_HPP
|