diff -c -r skill-4.1/Config skill-4.1.1/Config
*** skill-4.1/Config	Fri Apr  5 23:53:20 2002
--- skill-4.1.1/Config	Fri May  3 22:08:23 2002
***************
*** 1,6 ****
  #!/bin/sh
  #
! #	$Id: Config,v 1.22 2002/04/06 04:53:07 forys Exp $
  #
  #	Config - edit skill Makefile filling in OSTYPE, COPTS, LIBS, and
  #		possibly BINGRP and BINMOD.
--- 1,6 ----
  #!/bin/sh
  #
! #	$Id: Config,v 1.23 2002/05/04 02:08:13 forys Exp $
  #
  #	Config - edit skill Makefile filling in OSTYPE, COPTS, LIBS, and
  #		possibly BINGRP and BINMOD.
***************
*** 41,46 ****
--- 41,49 ----
  	case "${UNAME_OS}" in
  	    AIX)
  		OS=aix3
+ 		;;
+ 	    Darwin)
+ 		OS=nbsd44
  		;;
  	    FreeBSD)
  		# tested nbsd44 back to 2.2.8 (probably works on prev revs)
diff -c -r skill-4.1/Makefile skill-4.1.1/Makefile
*** skill-4.1/Makefile	Fri Apr  5 23:53:39 2002
--- skill-4.1.1/Makefile	Fri May  3 22:08:23 2002
***************
*** 1,5 ****
  #
! # $Id: Makefile,v 1.39 2002/04/06 04:52:24 forys Exp $
  #
  # First, find the CONFIGURE comments and set up the "BIN*" and "MAN*"
  # defines according to local customs.  Next, if your operating system
--- 1,5 ----
  #
! # $Id: Makefile,v 1.40 2002/05/04 02:08:13 forys Exp $
  #
  # First, find the CONFIGURE comments and set up the "BIN*" and "MAN*"
  # defines according to local customs.  Next, if your operating system
***************
*** 12,17 ****
--- 12,18 ----
  #
  # Vendor	Release		OSTYPE		Notes
  # ------------	--------------	--------------	--------------
+ # Apple		Darwin 5.4	nbsd-44
  # AT&T/DELL	SVR4		sys-5r4
  # Berkeley	4.2BSD		bsd-43		COPTS=-DNO_UID_T
  # Berkeley	4.3BSD		bsd-43		BINGRP=kmem BINMOD=2755
diff -c -r skill-4.1/README skill-4.1.1/README
*** skill-4.1/README	Fri Apr  5 22:55:40 2002
--- skill-4.1.1/README	Tue Aug 19 13:18:36 2003
***************
*** 20,26 ****
  ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
  
! $Id: README,v 1.48 2002/04/06 03:55:25 forys Exp $
  
  	`skill' is a program which sends signals to processes given
  any combination of user names, ttys, commands, and pids.  `snice' is
--- 20,26 ----
  ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
  
! $Id: README,v 1.52 2003/08/19 17:18:29 forys Exp $
  
  	`skill' is a program which sends signals to processes given
  any combination of user names, ttys, commands, and pids.  `snice' is
***************
*** 35,40 ****
--- 35,41 ----
  
  Both programs run under a variety of operating systems, including:
  
+ 	Apple Darwin 5.4
  	AT&T SysVR4, SysVR4.2, SysVR4.2MP
  	4.2BSD, 4.3BSD, 4.4BSD (and many PC variants)
  	Mach 2.6, 3.0
***************
*** 42,59 ****
  	DEC AXP OSF/1
  	DEC/Compaq Tru64 Unix V3.2D-2, T3.2F-1, V4.0, V5.0-1B
  	Encore UMAX 4.2
! 	FreeBSD 2.0-2, 3.1, 4.5, 5.0
! 	HP-UX 6.5, 7.0, 8.0, 9.0-5, 10.1-20, 11.0-11
  	IBM AIX 3.1-2, 4.1
  	IBM AOS 4.3
! 	Linux 1.0-2, 2.1, 2.2
  	MIPS UMIPS 2.1
  	NeXT OS 1.0, 2.1
  	NetBSD 1.3-5
  	OpenBSD 2.6, 3.0
  	Pyramid OSx 4.0
  	SCO UnixWare 7.0.1
! 	SGI Irix 3.3, 4.0, 5.2, 5.3, 6.2
  	Sequent Dynix 3.0-1
  	SunOS 2, 3, 4.0-1, 5.1-8
  
--- 43,60 ----
  	DEC AXP OSF/1
  	DEC/Compaq Tru64 Unix V3.2D-2, T3.2F-1, V4.0, V5.0-1B
  	Encore UMAX 4.2
! 	FreeBSD 2.0-2, 3.1, 4.4, 4.8, 5.0
! 	HP-UX 6.5, 7.0, 8.0, 9.0-5, 10.1-20, 11.0-22
  	IBM AIX 3.1-2, 4.1
  	IBM AOS 4.3
! 	Linux 1.0-2, 2.1, 2.2, 2.4
  	MIPS UMIPS 2.1
  	NeXT OS 1.0, 2.1
  	NetBSD 1.3-5
  	OpenBSD 2.6, 3.0
  	Pyramid OSx 4.0
  	SCO UnixWare 7.0.1
! 	SGI Irix 3.3, 4.0, 5.2, 5.3, 6.2, 6.5
  	Sequent Dynix 3.0-1
  	SunOS 2, 3, 4.0-1, 5.1-8
  
***************
*** 172,183 ****
  launching a large program can cause "ps" to display invalid process
  information (since the OS may start paging process u-area's around).
  
! The latest release of skill/snice is available from fast.cs.utah.edu
! [155.99.212.1] via anonymous ftp, in "~ftp/pub/skill".
  
  					Jeff Forys
- 					Compaq Computer Corp.
- 					+1 732 577 6078
  					jeff@forys.cranbury.nj.us
  
  ===========================================================================
--- 173,182 ----
  launching a large program can cause "ps" to display invalid process
  information (since the OS may start paging process u-area's around).
  
! The latest release of skill/snice is available from ftp.flux.utah.edu
! [155.98.63.200] via anonymous ftp, in "~ftp/pub/skill".
  
  					Jeff Forys
  					jeff@forys.cranbury.nj.us
  
  ===========================================================================
diff -c -r skill-4.1/argparse.c skill-4.1.1/argparse.c
*** skill-4.1/argparse.c	Fri Apr  5 13:23:25 2002
--- skill-4.1.1/argparse.c	Mon Aug 18 20:36:54 2003
***************
*** 21,27 ****
  */
  
  #ifndef lint
! static char rcsid[] = "$Id: argparse.c,v 1.14 2002/04/05 18:23:16 forys Exp $";
  #endif
  
  #define	NO_AEXTERN
--- 21,27 ----
  */
  
  #ifndef lint
! static char rcsid[] = "$Id: argparse.c,v 1.15 2003/08/19 00:36:19 forys Exp $";
  #endif
  
  #define	NO_AEXTERN
***************
*** 40,46 ****
  pid_T	*PidList = NULL;		/* list of process id's */
  cmd_T	*CmdList = NULL;		/* list of commands */
  int	TtyIndx = 0, UidIndx = 0, PidIndx = 0, CmdIndx = 0;
! int	Fflag = 0, Iflag = 0, Nflag = 0, Vflag = 0, Wflag = 0;
  
  /*
   * Because some vendors now have long symbolic signal names, "kill -l" may
--- 40,46 ----
  pid_T	*PidList = NULL;		/* list of process id's */
  cmd_T	*CmdList = NULL;		/* list of commands */
  int	TtyIndx = 0, UidIndx = 0, PidIndx = 0, CmdIndx = 0;
! int	Aflag = 0, Fflag = 0, Iflag = 0, Nflag = 0, Vflag = 0, Wflag = 0;
  
  /*
   * Because some vendors now have long symbolic signal names, "kill -l" may
***************
*** 72,77 ****
--- 72,87 ----
  	if ((loc = (type) calloc((unsigned)cnt,sizeof(type))) == NULL)	\
  		Exceed(nstr)
  
+ #ifndef	NO_GETENV
+ 	/* if "SKILL_VERBOSE" env var is set, enable verbose mode */
+ 	{
+ 		extern char *getenv();
+ 
+ 		if (getenv("SKILL_VERBOSE") != NULL)
+ 			Vflag++;
+ 	}
+ #endif
+ 
  	/*
  	 * This is the main argument parsing loop.  At first glance
  	 * this may look confusing.  We destructively move across
***************
*** 99,104 ****
--- 109,117 ----
  		    do {
  			argloop = 0;
  			switch (*++(*argv)) {
+ 			    case 'a':
+ 				Aflag++;
+ 				break;
  			    case 'l':
  				if (Skill)
  					ListSigs();
***************
*** 263,269 ****
  	 *  the general user is not usually allowed to modify the
  	 *  state of other users' processes.
  	 */
! 	if (UidIndx == 0 && MyUid != ROOTUID) {
  		ALLOC(1, uid_T *, UidList, "user");
  		*(UidList + UidIndx++) = MyUid;
  	}
--- 276,282 ----
  	 *  the general user is not usually allowed to modify the
  	 *  state of other users' processes.
  	 */
! 	if (Aflag == 0 && (UidIndx == 0 && MyUid != ROOTUID)) {
  		ALLOC(1, uid_T *, UidList, "user");
  		*(UidList + UidIndx++) = MyUid;
  	}
diff -c -r skill-4.1/machdep/nbsd-44.c skill-4.1.1/machdep/nbsd-44.c
*** skill-4.1/machdep/nbsd-44.c	Sun Apr  7 22:35:21 2002
--- skill-4.1.1/machdep/nbsd-44.c	Fri May  3 22:08:43 2002
***************
*** 23,29 ****
  */
  
  #ifndef lint
! static char rcsid[] = "$Id: nbsd-44.c,v 1.6 2002/04/05 18:33:27 forys Exp $";
  #endif
  
  #define	NO_MEXTERN
--- 23,29 ----
  */
  
  #ifndef lint
! static char rcsid[] = "$Id: nbsd-44.c,v 1.7 2002/05/04 02:08:34 forys Exp $";
  #endif
  
  #define	NO_MEXTERN
***************
*** 176,182 ****
  #include <sys/sysctl.h>
  
  static	char	*pidmap[] = {
! 	"swapper", "init", "pagedaemon"
  
  #ifdef __FreeBSD__
  #if (__FreeBSD__ > 4)
--- 176,187 ----
  #include <sys/sysctl.h>
  
  static	char	*pidmap[] = {
! 	"swapper", "init"
! 
! #ifdef NeXTBSD
! 	, "mach_init"
! #else
! 	, "pagedaemon"
  
  #ifdef __FreeBSD__
  #if (__FreeBSD__ > 4)
***************
*** 195,200 ****
--- 200,206 ----
  	, "reaper", "ioflush"
  #endif
  #endif
+ #endif	/* !NeXTBSD */
  
  };
  
diff -c -r skill-4.1/main.c skill-4.1.1/main.c
*** skill-4.1/main.c	Fri Apr  5 23:26:01 2002
--- skill-4.1.1/main.c	Mon Aug 18 20:36:08 2003
***************
*** 24,43 ****
   * skill - send signals to processes by tty, user name, command or proc id.
   * snice - reprioritize processes by tty, user name, command or proc id.
   *
!  * Version 4.1.0
   */
  
  #ifndef lint
! static char rcsid[] = "$Id: main.c,v 1.36 2002/04/06 04:25:39 forys Exp $";
  /*
   * SCCS version release number is manually updated (for what(1), etc).
!  * If you use SCCS, please use last extension for version (e.g. "4.1.0.1").
   */
  static char sccsid[] = 
! 	"@(#)skill	4.1.0.0 (jeff@forys.cranbury.nj.us) 04/07/02";
  #endif
  
! const char *Version = "4.1.0 20020407";
  
  const char *CopyrightVersion = "%s %s\n\nCopyright (c) 1986, 1994, 1996, 2000, 2002 Jeff Forys.  All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, is permitted under the terms specified in the source\ncode (and manual pages).\n";
  
--- 24,43 ----
   * skill - send signals to processes by tty, user name, command or proc id.
   * snice - reprioritize processes by tty, user name, command or proc id.
   *
!  * Version 4.1.1
   */
  
  #ifndef lint
! static char rcsid[] = "$Id: main.c,v 1.37 2003/08/19 00:36:02 forys Exp $";
  /*
   * SCCS version release number is manually updated (for what(1), etc).
!  * If you use SCCS, please use last extension for version (e.g. "4.1.1.1").
   */
  static char sccsid[] = 
! 	"@(#)skill	4.1.1.0 (jeff@forys.cranbury.nj.us) 08/18/03";
  #endif
  
! const char *Version = "4.1.1 20030818";
  
  const char *CopyrightVersion = "%s %s\n\nCopyright (c) 1986, 1994, 1996, 2000, 2002 Jeff Forys.  All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, is permitted under the terms specified in the source\ncode (and manual pages).\n";
  
diff -c -r skill-4.1/skill.1 skill-4.1.1/skill.1
*** skill-4.1/skill.1	Fri Apr  5 13:29:53 2002
--- skill-4.1.1/skill.1	Mon Aug 18 20:37:24 2003
***************
*** 19,39 ****
  .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  .\"
! .\" $Id: skill.1,v 1.18 2002/04/05 18:29:25 forys Exp $
  .\"
  .\" skill - send signals to processes by tty, user name, command or proc id.
  .\" skill - reprioritize processes by tty, user name, command or proc id.
  .\"
! .TH SKILL 1 "April 7, 2002" "" "Local UNIX Programmer's Manual"
  .UC 4
  .SH NAME
  skill, snice \- signal or reprioritize specified processes
  .SH SYNOPSIS
  .B skill
! [\-signal] [\-ivfwn] {tty user command pid}
  .br
  .B snice
! [(\-\||\|+)priority] [\-ivfwn] {tty user command pid}
  .br
  .B skill
  \-l
--- 19,39 ----
  .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  .\"
! .\" $Id: skill.1,v 1.19 2003/08/19 00:37:02 forys Exp $
  .\"
  .\" skill - send signals to processes by tty, user name, command or proc id.
  .\" skill - reprioritize processes by tty, user name, command or proc id.
  .\"
! .TH SKILL 1 "August 18, 2003" "" "Local UNIX Programmer's Manual"
  .UC 4
  .SH NAME
  skill, snice \- signal or reprioritize specified processes
  .SH SYNOPSIS
  .B skill
! [\-signal] [\-afinvw] {tty user command pid}
  .br
  .B snice
! [(\-\||\|+)priority] [\-afinvw] {tty user command pid}
  .br
  .B skill
  \-l
***************
*** 51,57 ****
  alters the scheduling priority of selected processes.
  By default, the new priority is
  .I +4,
! but an argument of the form `+n' (or `-n') can be used to specify
  some other value.
  Since the meaning of "priority" differs wildly,
  .I snice
--- 51,57 ----
  alters the scheduling priority of selected processes.
  By default, the new priority is
  .I +4,
! but an argument of the form `+N' (or `-N') can be used to specify
  some other value.
  Since the meaning of "priority" differs wildly,
  .I snice
***************
*** 65,70 ****
--- 65,82 ----
  is only guaranteed to operate on processes in the "Time Share" class.
  .PP
  Options accepted by both commands are as follows:
+ .IP \-a
+ When run by an unprivileged user, processes that belong to other users
+ are quietly ignored.  In all mode, this internal filter is disabled.
+ It may be used in conjunction with the `-n' flag to display a set of
+ processes that match a specified criteria.  This flag has no effect
+ for the super-user.
+ .IP \-f
+ In fast mode, the machine-dependent code responsible for reading
+ processes is allowed to make decisions to improve speed at the
+ expense of error reporting (e.g. commands may not be displayed).
+ This option mainly exists to aid in killing runaway processes
+ on operating systems with complicated virtual memory designs.
  .IP \-i
  In interactive mode, the user is prompted with each process
  that is a candidate for action.  Responding `y' will carry out
***************
*** 73,95 ****
  or
  .I snice
  to exit immediately.
  .IP \-v
  In verbose mode, the id of each process successfully acted
! upon is displayed.
  Alternately, when this is the only argument,
  version information is displayed and the program exits.
- .IP \-f
- In fast mode, the machine-dependent code responsible for reading
- processes is allowed to make decisions to improve speed at the
- expense of error reporting (e.g. commands may not be displayed).
- This option mainly exists to aid in killing runaway processes
- on operating systems with complicated VM designs.
  .IP \-w
  Display warning messages for unreachable processes.
- .IP \-n
- Display process id's but do
- .I not
- act on them.
  .PP
  All command line arguments are order independent.
  .I Skill
--- 85,103 ----
  or
  .I snice
  to exit immediately.
+ .IP \-n
+ Display process id's but do
+ .I not
+ act on them.
  .IP \-v
  In verbose mode, the id of each process successfully acted
! upon is displayed.  Verbose mode may be enabled by default
! by setting the "\fBSKILL_VERBOSE\fP" environment variable.
! .br
  Alternately, when this is the only argument,
  version information is displayed and the program exits.
  .IP \-w
  Display warning messages for unreachable processes.
  .PP
  All command line arguments are order independent.
  .I Skill
***************
*** 140,148 ****
  .I command.
  To override this, an argument can be
  .B forced
! to a particular type by preceding it with "-c" (command), "-u"
! (user), "-t" (tty), or "-p" (process id).
! As a special case, a question mark ("?") is categorized as a tty, and
  will match processes without controlling ttys.
  .PP
  When targeting processes by command name, both
--- 148,156 ----
  .I command.
  To override this, an argument can be
  .B forced
! to a particular type by preceding it with `-c' (command), `-u'
! (user), `-t' (tty), or `-p' (process id).
! As a special case, a question mark (`?') is categorized as a tty, and
  will match processes without controlling ttys.
  .PP
  When targeting processes by command name, both
***************
*** 154,160 ****
  permitted to change their argument vector (specifically argv[0]),
  an errant program could continually change its name to avoid being
  acted upon.  When targeting a process that has changed its name,
! use the "-nv" options to see its actual name.  Command names may
  be specified using regular expressions by enclosing them in forward
  slashes.  For example, `skill -KILL /d$/' will send the
  .I kill
--- 162,168 ----
  permitted to change their argument vector (specifically argv[0]),
  an errant program could continually change its name to avoid being
  acted upon.  When targeting a process that has changed its name,
! use the `-nv' options to see its actual name.  Command names may
  be specified using regular expressions by enclosing them in forward
  slashes.  For example, `skill -KILL /d$/' will send the
  .I kill
