Deleted Added
full compact
pidfile.c (229937) pidfile.c (229942)
1/*-
2 * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libutil/pidfile.c 229937 2012-01-10 19:53:25Z ghelmer $");
28__FBSDID("$FreeBSD: head/lib/libutil/pidfile.c 229942 2012-01-10 21:47:58Z ghelmer $");
29
30#include <sys/param.h>
31#include <sys/file.h>
32#include <sys/stat.h>
33
34#include <stdio.h>
35#include <stdlib.h>
36#include <unistd.h>

--- 228 unchanged lines hidden (view full) ---

265{
266
267 return (_pidfile_remove(pfh, 1));
268}
269
270int
271pidfile_fileno(struct pidfh *pfh)
272{
29
30#include <sys/param.h>
31#include <sys/file.h>
32#include <sys/stat.h>
33
34#include <stdio.h>
35#include <stdlib.h>
36#include <unistd.h>

--- 228 unchanged lines hidden (view full) ---

265{
266
267 return (_pidfile_remove(pfh, 1));
268}
269
270int
271pidfile_fileno(struct pidfh *pfh)
272{
273
273 if (pfh == NULL || pfh->pf_fd == -1) {
274 errno = EDOOFUS;
275 return (-1);
276 }
277 return (pfh->pf_fd);
278}
274 if (pfh == NULL || pfh->pf_fd == -1) {
275 errno = EDOOFUS;
276 return (-1);
277 }
278 return (pfh->pf_fd);
279}