File: auto_proc.hpp

package info (click to toggle)
videolink 1.2.5-1
  • links: PTS
  • area: contrib
  • in suites: lenny
  • size: 392 kB
  • ctags: 526
  • sloc: cpp: 3,316; ansic: 884; makefile: 127
file content (30 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (3)
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