hooks.h revision 211885
1306196Sjkim/*- 2110010Smarkm * Copyright (c) 2010 The FreeBSD Foundation 3110010Smarkm * Copyright (c) 2010 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4160819Ssimon * All rights reserved. 5110010Smarkm * 6110010Smarkm * This software was developed by Pawel Jakub Dawidek under sponsorship from 7110010Smarkm * the FreeBSD Foundation. 8110010Smarkm * 9110010Smarkm * Redistribution and use in source and binary forms, with or without 10110010Smarkm * modification, are permitted provided that the following conditions 11110010Smarkm * are met: 12110010Smarkm * 1. Redistributions of source code must retain the above copyright 13110010Smarkm * notice, this list of conditions and the following disclaimer. 14110010Smarkm * 2. Redistributions in binary form must reproduce the above copyright 15110010Smarkm * notice, this list of conditions and the following disclaimer in the 16110010Smarkm * documentation and/or other materials provided with the distribution. 17110010Smarkm * 18110010Smarkm * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 19110010Smarkm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20215698Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21215698Ssimon * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 22215698Ssimon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23215698Ssimon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24215698Ssimon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25110010Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26110010Smarkm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27110010Smarkm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28110010Smarkm * SUCH DAMAGE. 29110010Smarkm * 30110010Smarkm * $FreeBSD: head/sbin/hastd/hooks.h 211885 2010-08-27 14:38:12Z pjd $ 31110010Smarkm */ 32110010Smarkm 33110010Smarkm#ifndef _HOOKS_H_ 34110010Smarkm#define _HOOKS_H_ 35110010Smarkm 36110010Smarkm#include <stdarg.h> 37110010Smarkm#include <stdbool.h> 38110010Smarkm 39110010Smarkmvoid hook_init(void); 40110010Smarkmvoid hook_check(bool sigchld); 41276864Sjkimvoid hook_exec(const char *path, ...); 42276864Sjkimvoid hook_execv(const char *path, va_list ap); 43110010Smarkm 44110010Smarkm#endif /* !_HOOKS_H_ */ 45215698Ssimon