diff options
author | jkar8572 <jkar8572> | 2001-09-17 11:48:40 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2001-09-17 11:48:40 +0000 |
commit | bc29c71483ec63ef61b3eb3cb3ebd8eefc7c03e5 (patch) | |
tree | 2fb99a5d7b3d6cc209b7eff99e77118f8cf8affc /rquota_svc.c | |
parent | b38bda88e0b6050d745889f478f6f8b78a7e776f (diff) | |
download | linuxquota-bc29c71483ec63ef61b3eb3cb3ebd8eefc7c03e5.tar.gz |
Fixed memleak and SIGPIPE in rpc.rquota (Jani Jaakkola)
Diffstat (limited to 'rquota_svc.c')
-rw-r--r-- | rquota_svc.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/rquota_svc.c b/rquota_svc.c index ec37909..5c822e1 100644 --- a/rquota_svc.c +++ b/rquota_svc.c @@ -10,7 +10,7 @@ * * Author: Marco van Wieringen <mvw@planets.elm.net> * - * Version: $Id: rquota_svc.c,v 1.5 2001/08/22 21:17:56 jkar8572 Exp $ + * Version: $Id: rquota_svc.c,v 1.6 2001/09/17 11:48:40 jkar8572 Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -49,9 +49,6 @@ char *progname; */ struct authunix_parms *unix_cred; -char **argvargs; -int argcargs; - #ifdef HOSTS_ACCESS int good_client(struct sockaddr_in *addr) { @@ -263,12 +260,12 @@ static void rquotaprog_2(struct svc_req *rqstp, register SVCXPRT * transp) int main(int argc, char **argv) { register SVCXPRT *transp; - - argcargs = argc; - argvargs = argv; + int background = 1; gettexton(); progname = basename(argv[0]); + if (argc == 2 && (!strcmp(argv[1], "--foreground") || !strcmp(argv[1], "-f"))) + background = 0; warn_new_kernel(-1); @@ -303,7 +300,8 @@ int main(int argc, char **argv) exit(1); } - daemon(1, 1); + if (background) + daemon(0, 0); svc_run(); errstr(_("svc_run returned\n")); exit(1); |