1*fc8ee2f5Schristos /* $NetBSD: main.c,v 1.2 2017/04/10 16:37:48 christos Exp $ */
27d0b3229Schristos /* $OpenBSD: main.c,v 1.1 2015/10/10 19:28:54 deraadt Exp $ */
37d0b3229Schristos
47d0b3229Schristos /*
57d0b3229Schristos * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
67d0b3229Schristos *
77d0b3229Schristos * Permission to use, copy, modify, and distribute this software for any
87d0b3229Schristos * purpose with or without fee is hereby granted, provided that the above
97d0b3229Schristos * copyright notice and this permission notice appear in all copies.
107d0b3229Schristos *
117d0b3229Schristos * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
127d0b3229Schristos * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
137d0b3229Schristos * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
147d0b3229Schristos * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
157d0b3229Schristos * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
167d0b3229Schristos * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
177d0b3229Schristos * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
187d0b3229Schristos */
19*fc8ee2f5Schristos #include <sys/cdefs.h>
20*fc8ee2f5Schristos __RCSID("$NetBSD: main.c,v 1.2 2017/04/10 16:37:48 christos Exp $");
217d0b3229Schristos
227d0b3229Schristos #include <err.h>
237d0b3229Schristos #include <stdlib.h>
247d0b3229Schristos #include <unistd.h>
257d0b3229Schristos
267d0b3229Schristos #include "extern.h"
277d0b3229Schristos
287d0b3229Schristos int
main(int argc,char * argv[])297d0b3229Schristos main(int argc, char *argv[])
307d0b3229Schristos {
317d0b3229Schristos setproctitle("dc");
327d0b3229Schristos
33*fc8ee2f5Schristos #ifdef __OpenBSD__
347d0b3229Schristos if (pledge("stdio rpath", NULL) == -1)
357d0b3229Schristos err(1, "pledge");
36*fc8ee2f5Schristos #endif
377d0b3229Schristos
387d0b3229Schristos return dc_main(argc, argv);
397d0b3229Schristos }
40