daemon.c (167700) | daemon.c (168868) |
---|---|
1/*- 2 * Copyright (c) 1999 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 15 unchanged lines hidden (view full) --- 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * From BSDI: daemon.c,v 1.2 1996/08/15 01:11:09 jch Exp 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 15 unchanged lines hidden (view full) --- 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * From BSDI: daemon.c,v 1.2 1996/08/15 01:11:09 jch Exp 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/usr.sbin/daemon/daemon.c 167700 2007-03-19 12:12:53Z trhodes $"); | 32__FBSDID("$FreeBSD: head/usr.sbin/daemon/daemon.c 168868 2007-04-19 16:43:30Z peter $"); |
33 34#include <sys/param.h> 35 36#include <err.h> 37#include <errno.h> 38#include <pwd.h> 39#include <libutil.h> 40#include <login_cap.h> --- 9 unchanged lines hidden (view full) --- 50{ 51 struct pidfh *pfh = NULL; 52 int ch, nochdir, noclose, errcode; 53 const char *pidfile, *user; 54 pid_t otherpid; 55 56 nochdir = noclose = 1; 57 pidfile = user = NULL; | 33 34#include <sys/param.h> 35 36#include <err.h> 37#include <errno.h> 38#include <pwd.h> 39#include <libutil.h> 40#include <login_cap.h> --- 9 unchanged lines hidden (view full) --- 50{ 51 struct pidfh *pfh = NULL; 52 int ch, nochdir, noclose, errcode; 53 const char *pidfile, *user; 54 pid_t otherpid; 55 56 nochdir = noclose = 1; 57 pidfile = user = NULL; |
58 while ((ch = getopt(argc, argv, "-cf:p:u:")) != -1) { | 58 while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { |
59 switch (ch) { 60 case 'c': 61 nochdir = 0; 62 break; 63 case 'f': 64 noclose = 0; 65 break; 66 case 'p': --- 75 unchanged lines hidden --- | 59 switch (ch) { 60 case 'c': 61 nochdir = 0; 62 break; 63 case 'f': 64 noclose = 0; 65 break; 66 case 'p': --- 75 unchanged lines hidden --- |