diff options
author | Kozlov Dmitry <dima@server> | 2010-09-03 14:00:45 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-03 14:00:45 +0400 |
commit | 935c25b34dba5d22372de3f792dd806db6d729a8 (patch) | |
tree | 2d4916ec75b5750f8ee0b8f06dbb1fc55e9f6add /accel-pptpd/main.c | |
parent | b43d224c8a306ff54bbb913c5aab891f82541f6e (diff) | |
download | accel-ppp-935c25b34dba5d22372de3f792dd806db6d729a8.tar.gz accel-ppp-935c25b34dba5d22372de3f792dd806db6d729a8.zip |
rewrited triton library
Diffstat (limited to 'accel-pptpd/main.c')
-rw-r--r-- | accel-pptpd/main.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/accel-pptpd/main.c b/accel-pptpd/main.c index 31069f3..0503625 100644 --- a/accel-pptpd/main.c +++ b/accel-pptpd/main.c @@ -32,13 +32,14 @@ static int parse_cmdline(char ***argv) *argv = malloc(ARG_MAX * sizeof(void *)); memset(*argv, 0, ARG_MAX * sizeof(void *)); - for(i = 0; i < ARG_MAX; i++) - { + for(i = 0; i < ARG_MAX; i++) { len = 0; if (getdelim(&(*argv)[i], &len, 0, f) < 0) break; } + fclose(f); + return i; } static void __init __main(void) @@ -113,9 +114,12 @@ int main(int argc, char **argv) } } + signal(SIGTERM, sigterm); + signal(SIGPIPE, sigterm); + signal(SIGUSR1, sigterm); + triton_run(); - signal(SIGTERM, sigterm); sigfillset(&set); sigdelset(&set, SIGTERM); sigdelset(&set, SIGSEGV); |