1 | /* |
1 | /* |
2 | vped.C -- the main file for gvpe |
2 | gvpe.C -- the main file for gvpe |
3 | Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl> |
3 | Copyright (C) 1998-2002 Ivo Timmermans <ivo@o2w.nl> |
4 | 2000-2002 Guus Sliepen <guus@sliepen.eu.org> |
4 | 2000-2002 Guus Sliepen <guus@sliepen.eu.org> |
5 | 2003-2005 Marc Lehmann <gvpe@schmorp.de> |
5 | 2003-2005 Marc Lehmann <gvpe@schmorp.de> |
6 | |
6 | |
7 | This file is part of GVPE. |
7 | This file is part of GVPE. |
… | |
… | |
197 | act.sa_flags = 0; |
197 | act.sa_flags = 0; |
198 | |
198 | |
199 | act.sa_handler = sighup_handler; sigaction (SIGHUP , &act, NULL); |
199 | act.sa_handler = sighup_handler; sigaction (SIGHUP , &act, NULL); |
200 | act.sa_handler = sigusr1_handler; sigaction (SIGUSR1, &act, NULL); |
200 | act.sa_handler = sigusr1_handler; sigaction (SIGUSR1, &act, NULL); |
201 | act.sa_handler = sigusr2_handler; sigaction (SIGUSR2, &act, NULL); |
201 | act.sa_handler = sigusr2_handler; sigaction (SIGUSR2, &act, NULL); |
202 | act.sa_handler = SIG_IGN; sigaction (SIGCHLD, &act, NULL); |
202 | // act.sa_handler = SIG_IGN; sigaction (SIGCHLD, &act, NULL); |
203 | act.sa_handler = SIG_IGN; sigaction (SIGPIPE, &act, NULL); |
203 | act.sa_handler = SIG_IGN; sigaction (SIGPIPE, &act, NULL); |
204 | act.sa_flags = SA_RESETHAND; |
204 | act.sa_flags = SA_RESETHAND; |
205 | act.sa_handler = sigterm_handler; sigaction (SIGINT , &act, NULL); |
205 | act.sa_handler = sigterm_handler; sigaction (SIGINT , &act, NULL); |
206 | act.sa_handler = sigterm_handler; sigaction (SIGTERM, &act, NULL); |
206 | act.sa_handler = sigterm_handler; sigaction (SIGTERM, &act, NULL); |
207 | } |
207 | } |
… | |
… | |
255 | |
255 | |
256 | RAND_load_file ("/dev/urandom", 1024); |
256 | RAND_load_file ("/dev/urandom", 1024); |
257 | |
257 | |
258 | if (!THISNODE) |
258 | if (!THISNODE) |
259 | { |
259 | { |
260 | slog (L_ERR, _("current node not set, or node '%s' not found in configfile, specify the nodename when starting vped."), |
260 | slog (L_ERR, _("current node not set, or node '%s' not found in configfile, specify the nodename when starting gvpe."), |
261 | thisnode ? thisnode : "<unset>"); |
261 | thisnode ? thisnode : "<unset>"); |
262 | exit (EXIT_FAILURE); |
262 | exit (EXIT_FAILURE); |
263 | } |
263 | } |
264 | |
264 | |
265 | if (detach (do_detach)) |
265 | if (detach (do_detach)) |