From owner-freebsd-bugs Sun Mar 19 20:40: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id D5C4F37B6FE for ; Sun, 19 Mar 2000 20:40:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA05593; Sun, 19 Mar 2000 20:40:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Sun, 19 Mar 2000 20:40:02 -0800 (PST) Message-Id: <200003200440.UAA05593@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Wemm Subject: Re: bin/17498: killall(1) is a slow perl script that's dependant on procfs Reply-To: Peter Wemm Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/17498; it has been noted by GNATS. From: Peter Wemm 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