Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tools/accounting/procacct: fix minor errors

The logfile option was documented but not working. Add it and optimized
the while loop.

Link: https://lkml.kernel.org/r/20241203020550.3145-1-zhangjiao2@cmss.chinamobile.com
Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Reviewed-by: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

zhang jiao and committed by
Andrew Morton
d5cf6b0d 658eb5ab

+2 -3
+2 -3
tools/accounting/procacct.c
··· 274 274 int maskset = 0; 275 275 char *logfile = NULL; 276 276 int cfd = 0; 277 - int forking = 0; 278 277 279 278 struct msgtemplate msg; 280 279 281 - while (!forking) { 282 - c = getopt(argc, argv, "m:vr:"); 280 + while (1) { 281 + c = getopt(argc, argv, "m:vr:w:"); 283 282 if (c < 0) 284 283 break; 285 284