- config = readconfig(argv[1]);
- signal(SIGCHLD, SIG_IGN);
+ if(!nodef) {
+ if((gcf = findstdconf("ashd/patplex.rc")) != NULL) {
+ gconfig = readconfig(gcf);
+ free(gcf);
+ }
+ }
+ if((strchr(lcf = argv[optind], '/')) == NULL) {
+ if((lcf = findstdconf(sprintf3("ashd/%s", lcf))) == NULL) {
+ flog(LOG_ERR, "could not find requested configuration file `%s'", argv[optind]);
+ exit(1);
+ }
+ }
+ if((lconfig = readconfig(lcf)) == NULL) {
+ flog(LOG_ERR, "could not read `%s'", lcf);
+ exit(1);
+ }
+ signal(SIGCHLD, chldhandler);
+ signal(SIGHUP, sighandler);
+ signal(SIGPIPE, sighandler);