Date: Sun, 19 Mar 2000 20:40:02 -0800 (PST) From: Peter Wemm <peter@netplex.com.au> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/17498: killall(1) is a slow perl script that's dependant on procfs Message-ID: <200003200440.UAA05593@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/17498; it has been noted by GNATS. From: Peter Wemm <peter@netplex.com.au> To: bugg@bugg.strangled.net Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/17498: killall(1) is a slow perl script that's dependant on procfs Date: Mon, 20 Mar 2000 04:38:26 -0800 Dan Papasian wrote: [..] > X ++argv; > X while (--argc > 0 && **argv == '-') { > X > X /* Remove dashes */ > X while (**argv == '-') > X ++* argv; > X > X /* If the argument ends here, it isn't the signal */ > X /* If it is a digit, it is the signal. Don't pass to switch */ > X if (argv[0][1] == '\0' && !isdigit(**argv)) { > X switch (**argv) { > X case 'd': > X case 'v': This doesn't use getopt(), it probably should. > X sysctl(mib, 3, NULL, &kplen, NULL, 0); > X procall = kp = malloc(kplen); > X sysctl(mib, 3, kp, &kplen, NULL, 0); There is no error checking here.. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003200440.UAA05593>