xref: /openbsd-src/usr.bin/dc/main.c (revision 9490edf2cc1db1c6c10782d325f0baf17b18d234)
1*9490edf2Sderaadt /*	$OpenBSD: main.c,v 1.1 2015/10/10 19:28:54 deraadt Exp $	*/
2*9490edf2Sderaadt 
3*9490edf2Sderaadt /*
4*9490edf2Sderaadt  * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
5*9490edf2Sderaadt  *
6*9490edf2Sderaadt  * Permission to use, copy, modify, and distribute this software for any
7*9490edf2Sderaadt  * purpose with or without fee is hereby granted, provided that the above
8*9490edf2Sderaadt  * copyright notice and this permission notice appear in all copies.
9*9490edf2Sderaadt  *
10*9490edf2Sderaadt  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11*9490edf2Sderaadt  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12*9490edf2Sderaadt  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13*9490edf2Sderaadt  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14*9490edf2Sderaadt  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15*9490edf2Sderaadt  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16*9490edf2Sderaadt  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*9490edf2Sderaadt  */
18*9490edf2Sderaadt 
19*9490edf2Sderaadt #include <err.h>
20*9490edf2Sderaadt #include <stdlib.h>
21*9490edf2Sderaadt #include <unistd.h>
22*9490edf2Sderaadt 
23*9490edf2Sderaadt #include "extern.h"
24*9490edf2Sderaadt 
25*9490edf2Sderaadt int
main(int argc,char * argv[])26*9490edf2Sderaadt main(int argc, char *argv[])
27*9490edf2Sderaadt {
28*9490edf2Sderaadt 	setproctitle("dc");
29*9490edf2Sderaadt 
30*9490edf2Sderaadt 	if (pledge("stdio rpath", NULL) == -1)
31*9490edf2Sderaadt 		err(1, "pledge");
32*9490edf2Sderaadt 
33*9490edf2Sderaadt 	return dc_main(argc, argv);
34*9490edf2Sderaadt }
35