1*7827cba2SAaron LI /*- 2*7827cba2SAaron LI * Copyright (c) 1999, 2016 The NetBSD Foundation, Inc. 3*7827cba2SAaron LI * All rights reserved. 4*7827cba2SAaron LI * 5*7827cba2SAaron LI * This code is derived from software contributed to The NetBSD Foundation 6*7827cba2SAaron LI * by Jason R. Thorpe, Matthias Scheler, Julio Merino and Roy Marples. 7*7827cba2SAaron LI * 8*7827cba2SAaron LI * Redistribution and use in source and binary forms, with or without 9*7827cba2SAaron LI * modification, are permitted provided that the following conditions 10*7827cba2SAaron LI * are met: 11*7827cba2SAaron LI * 1. Redistributions of source code must retain the above copyright 12*7827cba2SAaron LI * notice, this list of conditions and the following disclaimer. 13*7827cba2SAaron LI * 2. Redistributions in binary form must reproduce the above copyright 14*7827cba2SAaron LI * notice, this list of conditions and the following disclaimer in the 15*7827cba2SAaron LI * documentation and/or other materials provided with the distribution. 16*7827cba2SAaron LI * 17*7827cba2SAaron LI * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18*7827cba2SAaron LI * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19*7827cba2SAaron LI * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20*7827cba2SAaron LI * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21*7827cba2SAaron LI * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22*7827cba2SAaron LI * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23*7827cba2SAaron LI * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24*7827cba2SAaron LI * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25*7827cba2SAaron LI * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26*7827cba2SAaron LI * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27*7827cba2SAaron LI * POSSIBILITY OF SUCH DAMAGE. 28*7827cba2SAaron LI */ 29*7827cba2SAaron LI 30*7827cba2SAaron LI #ifndef PIDFILE_H 31*7827cba2SAaron LI #define PIDFILE_H 32*7827cba2SAaron LI 33*7827cba2SAaron LI #include <unistd.h> 34*7827cba2SAaron LI 35*7827cba2SAaron LI int pidfile_clean(void); 36*7827cba2SAaron LI pid_t pidfile_lock(const char *); 37*7827cba2SAaron LI pid_t pidfile_read(const char *); 38*7827cba2SAaron LI 39*7827cba2SAaron LI #endif 40