diff --git a/.gitignore b/.gitignore index f2a3c565..45d85b08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,44 @@ +aclocal.m4 +autom4te.cache +compile +config.guess +config.h +config.h.in +config.log +config.status +config.sub +configure +depcomp +.deps +.libs free +INSTALL +install-sh kill +libtool +*.lo +ltmain.sh +m4/ +Makefile +Makefile.in +missing +*.o pgrep pkill pmap proc/.depend -proc/libproc-3.2.8.so -ps/ps +proc/libproc-ng.la +proc/Makefile +proc/Makefile.in +ps/Makefile +ps/Makefile.in +ps/pscommand pwdx skill slabtop snice +*.so +stamp-h1 sysctl tload top diff --git a/BUGS b/BUGS index ec45bde6..49722d9f 100644 --- a/BUGS +++ b/BUGS @@ -3,7 +3,7 @@ BUG REPORTS Please read this file before sending in a bug report or patch. Also, PLEASE read the documentation first. 90% of the mail I get -complaining about procps is due to the sender not having read the +complaining about procps-ng is due to the sender not having read the documentation! @@ -49,7 +49,7 @@ are kind of usable, and standard diffs (diff) are more useless than a generic text description of what you did. Just use diff -Naurd oldfile newfile or - diff -Naurd old-procps-dir new-procps-dir + diff -Naurd old-procps-ng-dir new-procps-ng-dir to create your diffs and you will make me happy. Also make sure to include a description of what the diff is for or I'm likely to ignore it because of general lack of time... diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..e69de29b diff --git a/Makefile b/Makefile deleted file mode 100644 index e453453c..00000000 --- a/Makefile +++ /dev/null @@ -1,262 +0,0 @@ -# procps Makefile -# Albert Cahalan, 2002-2004 -# -# Recursive make is considered harmful: -# http://google.com/search?q=%22recursive+make+considered+harmful%22 -# -# For now this Makefile uses explicit dependencies. The project -# hasn't grown big enough to need something complicated, and the -# dependency tracking files are an ugly annoyance. -# -# This file includes */module.mk files which add on to variables: -# FOO += bar/baz -# -# -# Set (or uncomment) SKIP if you wish to avoid something. -# For example, you may prefer the /bin/kill from util-linux or bsdutils. - - -VERSION := 3 -SUBVERSION := 2 -MINORVERSION := 8 -TARVERSION := $(VERSION).$(SUBVERSION).$(MINORVERSION) - -############ vars - -# so you can disable them or choose alternates -ldconfig := ldconfig -ln_f := ln -f -ln_sf := ln -sf -install := install -D --owner 0 --group 0 - -# Lame x86-64 /lib64 and /usr/lib64 abomination: -lib64 := lib$(shell [ -d /lib64 ] && echo 64) - -usr/bin := $(DESTDIR)/usr/bin/ -bin := $(DESTDIR)/bin/ -sbin := $(DESTDIR)/sbin/ -usr/proc/bin := $(DESTDIR)/usr/bin/ -man1 := $(DESTDIR)/usr/share/man/man1/ -man5 := $(DESTDIR)/usr/share/man/man5/ -man8 := $(DESTDIR)/usr/share/man/man8/ -lib := $(DESTDIR)/$(lib64)/ -usr/lib := $(DESTDIR)/usr/$(lib64)/ -usr/include := $(DESTDIR)/usr/include/ - -#SKIP := $(bin)kill $(man1)kill.1 - -BINFILES := $(usr/bin)uptime $(usr/bin)tload $(usr/bin)free $(usr/bin)w \ - $(usr/bin)top $(usr/bin)vmstat $(usr/bin)watch $(usr/bin)skill \ - $(usr/bin)snice $(bin)kill $(sbin)sysctl $(usr/bin)pmap \ - $(usr/proc/bin)pgrep $(usr/proc/bin)pkill $(usr/bin)slabtop \ - $(usr/proc/bin)pwdx - -MANFILES := $(man1)uptime.1 $(man1)tload.1 $(man1)free.1 $(man1)w.1 \ - $(man1)top.1 $(man1)watch.1 $(man1)skill.1 $(man1)kill.1 \ - $(man1)snice.1 $(man1)pgrep.1 $(man1)pkill.1 $(man1)pmap.1 \ - $(man5)sysctl.conf.5 $(man8)vmstat.8 $(man8)sysctl.8 \ - $(man1)slabtop.1 $(man1)pwdx.1 - -TARFILES := AUTHORS BUGS NEWS README TODO COPYING COPYING.LIB \ - Makefile procps.lsm procps.spec v t README.top CodingStyle \ - sysctl.conf minimal.c $(notdir $(MANFILES)) dummy.c \ - uptime.c tload.c free.c w.c top.c vmstat.c watch.c skill.c \ - sysctl.c pgrep.c top.h pmap.c slabtop.c pwdx.c - -# Stuff (tests, temporary hacks, etc.) left out of the standard tarball -# plus the top-level Makefile to make it work stand-alone. -_TARFILES := Makefile - -CURSES := -lncurses - -# This seems about right for the dynamic library stuff. -# Something like this is probably needed to make the SE Linux -# library loading not conflict with embedded systems stuff. -# -#ifeq ($(SHARED),1) -#ldl := -ldl -#LIBTYPE := -DSHAREDLIB -#else -#LIBTYPE := -DSTATICLIB -#endif - -# Preprocessor flags. -PKG_CPPFLAGS := -D_GNU_SOURCE -I proc -CPPFLAGS := -I/usr/include/ncurses -ALL_CPPFLAGS := $(PKG_CPPFLAGS) $(CPPFLAGS) - -# Left out -Wconversion due to noise in glibc headers. -# Left out -Wunreachable-code and -Wdisabled-optimization -# because gcc spews many useless warnings with them. -# -# Since none of the PKG_CFLAGS things are truly required -# to compile procps, they might best be moved to CFLAGS. -# On the other hand, they aren't normal -O -g things either. -# -# Note that -O2 includes -fomit-frame-pointer only if the arch -# doesn't lose some debugging ability. -# -PKG_CFLAGS := -fno-common -ffast-math \ - -W -Wall -Wshadow -Wcast-align -Wredundant-decls \ - -Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return \ - -Wstrict-prototypes -Wmissing-prototypes -# Note that some stuff below is conditional on CFLAGS containing -# an option that starts with "-g". (-g, -g2, -g3, -ggdb, etc.) -CFLAGS := -O2 -s -ALL_CFLAGS := $(PKG_CFLAGS) $(CFLAGS) - -PKG_LDFLAGS := -Wl,-warn-common -LDFLAGS := -ALL_LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS) - -############ Add some extra flags if gcc allows - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(MAKECMDGOALS),tar) -ifneq ($(MAKECMDGOALS),extratar) -ifneq ($(MAKECMDGOALS),beta) - -# Unlike the kernel one, this check_gcc goes all the way to -# producing an executable. There might be a -m64 that works -# until you go looking for a 64-bit curses library. -check_gcc = $(shell if $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) dummy.c $(ALL_LDFLAGS) $(1) -o /dev/null $(CURSES) > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) - -# Be 64-bit if at all possible. In a cross-compiling situation, one may -# do "make m64=-m32 lib64=lib" to produce 32-bit executables. DO NOT -# attempt to use a 32-bit executable on a 64-bit kernel. Packagers MUST -# produce separate executables for ppc and ppc64, s390 and s390x, -# i386 and x86-64, mips and mips64, sparc and sparc64, and so on. -# Failure to do so will cause data corruption. -m64 := $(call check_gcc,-m64,$(call check_gcc,-mabi=64,)) -ALL_CFLAGS += $(m64) - -ALL_CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,) -ALL_CFLAGS += $(call check_gcc,-Wpadded,) -ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing,) - -# Adding -fno-gcse might be good for those files which -# use computed goto. -#ALL_CFLAGS += $(call check_gcc,-fno-gcse,) - -# if not debugging, enable things that could confuse gdb -ifeq (,$(findstring -g,$(filter -g%,$(CFLAGS)))) -ALL_CFLAGS += $(call check_gcc,-fweb,) -ALL_CFLAGS += $(call check_gcc,-frename-registers,) -ALL_CFLAGS += $(call check_gcc,-fomit-frame-pointer,) -endif - -# in case -O3 is enabled, avoid bloat -ALL_CFLAGS += $(call check_gcc,-fno-inline-functions,) - -endif -endif -endif -endif - -############ misc. - -# free.c pmap.c sysctl.c uptime.c vmstat.c watch.c pgrep.c skill.c tload.c top.c w.c -# utmp.c oldtop.c tmp-junk.c minimal.c - -.SUFFIXES: -.SUFFIXES: .a .o .c .s .h - -.PHONY: all clean do_all install tar extratar beta - -ALL := $(notdir $(BINFILES)) - -CLEAN := $(notdir $(BINFILES)) - -DIRS := - -INSTALL := $(BINFILES) $(MANFILES) - -# want this rule first, use := on ALL, and ALL not filled in yet -all: do_all - --include proc/module.mk --include ps/module.mk - -do_all: $(ALL) - -junk := DEADJOE *~ *.o core gmon.out - -# Remove $(junk) from all $(DIRS) -CLEAN += $(junk) $(foreach dir,$(DIRS),$(addprefix $(dir), $(junk))) - -########## -# not maintained because it isn't really needed: -# -#SRC := -#OBJ := $(patsubst %.c,%.o, $(filter %.c,$(SRC))) -# -#ifneq ($(MAKECMDGOALS),clean) -#-include $(OBJ:.o=.d) -#endif -# -#%.d: %.c -# depend.sh $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< > $@ -############ - -# don't want to type "make procps-$(TARVERSION).tar.gz" -tar: $(TARFILES) - mkdir procps-$(TARVERSION) - (tar cf - $(TARFILES)) | (cd procps-$(TARVERSION) && tar xf -) - tar cf procps-$(TARVERSION).tar procps-$(TARVERSION) - gzip -9 procps-$(TARVERSION).tar - -extratar: $(_TARFILES) - mkdir procps-$(TARVERSION) - (tar cf - $(_TARFILES)) | (cd procps-$(TARVERSION) && tar xf -) - tar cf extra-$(TARVERSION).tar procps-$(TARVERSION) - gzip -9 extra-$(TARVERSION).tar - -beta: $(TARFILES) $(_TARFILES) - mkdir beta-$(TARVERSION) - (tar cf - $(TARFILES) $(_TARFILES)) | (cd beta-$(TARVERSION) && tar xf -) - tar cf beta-$(TARVERSION).tar beta-$(TARVERSION) - gzip -9 beta-$(TARVERSION).tar - -clean: - rm -f $(CLEAN) - -###### install - -$(BINFILES) : all - $(install) --mode a=rx $(notdir $@) $@ - -$(MANFILES) : all - $(install) --mode a=r $(notdir $@) $@ - -install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL)) - cd $(usr/bin) && $(ln_f) skill snice - cd $(usr/proc/bin) && $(ln_f) pgrep pkill - -############ prog.c --> prog.o - -top.o : top.h - -%.o : %.c - $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $< - -w.o: w.c - $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(W_SHOWFROM) -c $< - -############ prog.o --> prog - -pmap w uptime tload free sysctl vmstat utmp pgrep skill pwdx: % : %.o $(LIBPROC) - $(CC) $(ALL_CFLAGS) $^ $(ALL_LDFLAGS) -o $@ - -slabtop top: % : %.o $(LIBPROC) - $(CC) $(ALL_CFLAGS) $^ $(ALL_LDFLAGS) -o $@ $(CURSES) - -watch: % : %.o - $(CC) $(ALL_CFLAGS) $^ $(ALL_LDFLAGS) -o $@ $(CURSES) - -############ progX --> progY - -snice kill: skill - $(ln_f) skill $@ - -pkill: pgrep - $(ln_f) pgrep pkill diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..890f71bc --- /dev/null +++ b/Makefile.am @@ -0,0 +1,75 @@ +AM_CPPFLAGS = -include $(top_builddir)/config.h + +ACLOCAL_AMFLAGS = -I m4 +SUBDIRS = proc ps + +AM_CFLAGS = -Iproc +AM_LDFLAGS = ./proc/libproc-ng.la + +sbin_PROGRAMS = \ + sysctl + +bin_PROGRAMS = \ + kill + +usrbin_exec_PROGRAMS = \ + free \ + pgrep \ + pkill \ + pmap \ + pwdx \ + skill \ + snice \ + tload \ + uptime \ + vmstat \ + w + +dist_man_MANS = \ + free.1 \ + kill.1 \ + pgrep.1 \ + pkill.1 \ + pmap.1 \ + pwdx.1 \ + skill.1 \ + snice.1 \ + sysctl.8 \ + sysctl.conf.5 \ + tload.1 \ + uptime.1 \ + vmstat.8 \ + w.1 + +if HAVE_NCURSES +usrbin_exec_PROGRAMS += \ + slabtop \ + top \ + watch +top_SOURCES = top.c top.h +dist_man_MANS += \ + slabtop.1 \ + top.1 \ + watch.1 +slabtop_LDADD = @NCURSES_LIBS@ +top_LDADD = @NCURSES_LIBS@ +watch_LDADD = @NCURSES_LIBS@ +endif + +kill_SOURCES = skill.c +snice_SOURCES = skill.c +pkill_SOURCES = pgrep.c + +sysconf_DATA = sysctl.conf + +EXTRA_DIST = \ + autogen.sh \ + BUGS \ + CodingStyle \ + contrib/dummy.c \ + contrib/minimal.c \ + contrib/tmp-junk.c \ + contrib/utmp.c \ + COPYING.LIB \ + README.top \ + $(sysconf_DATA) diff --git a/NEWS b/NEWS index e51c91d5..669a9685 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +procps-3.2.9 --> procps-ng-3.3.0 + +Debian, Fedora and openSUSE fork of procps. +https://gitorious.org/procps + procps-3.2.8 --> procps-3.2.9 top: fix an aliasing problem -- thanks David Owen diff --git a/README b/README index fd761349..2ca616a4 100644 --- a/README +++ b/README @@ -10,7 +10,7 @@ INSTALLATION make install Only the second ("make install") is needed if you just - want to build and install procps in the normal way. + want to build and install procps-ng in the normal way. If you wish to test before installing, use the scripts named t, v, and p to ensure that the correct libproc @@ -21,7 +21,7 @@ INSTALLATION make SKIP='/bin/kill /usr/share/man/man1/kill.1' install - Use SHARED=0 to build procps without shared libraries. + Use SHARED=0 to build procps-ng without shared libraries. This may be useful for installing in your home directory. make SHARED=0 DESTDIR=$HOME install @@ -46,7 +46,7 @@ PACKAGING Send patches in regularly. Many patches made by vendors have been buggy, some quite severely so. Sending in a patch will at least get it reviewed, - if not included. There is a procps test suite that must be passed. + if not included. There is a procps-ng test suite that must be passed. Forward all bug reports. If your bug database is public and busy enough to bother with, please make this known. Follow Debian's lead in making the bug database easy to comment on via email w/o need for an account. @@ -54,7 +54,7 @@ PACKAGING Do not change the user interface. Many of the programs are intended to be compatible with Solaris, FreeBSD, AIX, IRIX, Tru64, and the UNIX standard. Your nice new command options WILL BE BROKEN as needed to ensure that - procps remains compatible with the rest of the world. Sysadmins hate to + procps-ng remains compatible with the rest of the world. Sysadmins hate to deal with incompatible behavior. If you need a new option, ask for it. For normal packages, ensure that you do not add debugging flags @@ -67,6 +67,4 @@ PACKAGING BUG REPORTS - Debian users should use the Debian bug tracking system. - Email to albert@users.sf.net or csmall@debian.org or - procps-feedback@lists.sf.net will also work. + Email to procps@freelists.org. diff --git a/TODO b/TODO index 7831ea04..46ac1270 100644 --- a/TODO +++ b/TODO @@ -6,8 +6,8 @@ Implement /usr/proc/bin tools like Solaris has. The prstat command is interesting, like top in batch mode. SCO has a pstat command. -Don't these really belong in the procps package? - killall pstree fuser lsof who +Don't these really belong in the procps-ng package? + killall pstree fuser lsof who (they are maintained elsewhere, which causes version problems) OpenBSD has a pfind command. diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000..b42f57b6 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,65 @@ +#!/bin/sh +# +# Helps generate autoconf/automake stuff, when code is checked +# out from SCM. + +SRCDIR=$(dirname ${0}) +test -z "${SRCDIR}" && SRCDIR=. + +THEDIR=$(pwd) +cd ${SRCDIR} +DIE=0 + +test -f top.c || { + echo "You must run this script in the top-level procps-ng directory" + DIE=1 +} + +(autoconf --version) < /dev/null > /dev/null || { + echo "You must have autoconf installed to generate procps-ng build system." + DIE=1 +} +(autoheader --version) < /dev/null > /dev/null || { + echo "You must have autoheader installed to generate procps-ng build system." + echo "The autoheader command is part of the GNU autoconf package." + DIE=1 +} +(libtool --version) < /dev/null > /dev/null || { + echo "You must have libtool-2 installed to generate procps-ng build system." + DIE=1 +} +(automake --version) < /dev/null > /dev/null || { + echo "You must have automake installed to generate procps-ng build system." + DIE=1 +} + +LTVER=$(libtoolize --version | awk '/^libtoolize/ { print $4 }') +LTVER=${LTVER:-"none"} +test ${LTVER##2.} = "${LTVER}" && { + echo "You must have libtoolize version >= 2.x.x, but you have ${LTVER}." + DIE=1 +} + +if test ${DIE} -ne 0; then + exit 1 +fi + +echo "Generate build-system by:" +echo " aclocal: $(aclocal --version | head -1)" +echo " autoconf: $(autoconf --version | head -1)" +echo " autoheader: $(autoheader --version | head -1)" +echo " automake: $(automake --version | head -1)" +echo " libtoolize: $(libtoolize --version | head -1)" + +rm -rf autom4te.cache + +set -e +libtoolize --force ${LT_OPTS} +aclocal -I m4 ${AL_OPTS} +autoconf ${AC_OPTS} +autoheader ${AH_OPTS} + +automake --add-missing ${AM_OPTS} + +echo +echo "Now type '${SRCDIR}/configure' and 'make' to compile." diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..aa124050 --- /dev/null +++ b/configure.ac @@ -0,0 +1,158 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.64]) +AC_CONFIG_MACRO_DIR([m4]) +AC_INIT([procps-ng], + [3.3.0], + [procps@freelists.org],,[http://gitorious.org/procps]) +AM_INIT_AUTOMAKE +AC_CONFIG_SRCDIR([top.c]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_GNU_SOURCE +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_INSTALL +AC_PROG_LN_S + +# Checks for libraries. +AC_CHECK_LIB([ncurses], [setupterm]) + +# Checks for header files. +AC_HEADER_MAJOR +AC_CHECK_HEADERS([\ + fcntl.h \ + langinfo.h \ + limits.h \ + locale.h \ + netinet/in.h \ + stdlib.h \ + string.h \ + sys/file.h \ + sys/ioctl.h \ + sys/param.h \ + sys/time.h \ + termios.h \ + unistd.h \ + utmp.h \ + values.h \ + wchar.h \ + wctype.h +]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_CHECK_MEMBERS([struct stat.st_rdev]) +AC_C_INLINE +AC_C_RESTRICT +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UID_T + +dnl libtool +LT_INIT + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_MBRTOWC +AC_FUNC_MMAP +AC_FUNC_REALLOC +AC_FUNC_STRTOD +AC_CHECK_FUNCS([\ + alarm \ + getpagesize \ + gettimeofday \ + iswprint \ + memchr \ + memmove \ + memset \ + munmap \ + nl_langinfo \ + putenv \ + regcomp \ + select \ + setlocale \ + strcasecmp \ + strverscmp \ + strchr \ + strcspn \ + strdup \ + strerror \ + strncasecmp \ + strpbrk \ + strrchr \ + strspn \ + strstr \ + strtol \ + strtoul \ + uname \ + utmpname \ + wcwidth +]) + +usrbin_execdir='${exec_prefix}/usr/bin' +AC_SUBST([usrbin_execdir]) + +dnl UTIL_CHECK_LIB(LIBRARY, FUNCTION, [VARSUFFIX = $1])) +dnl The VARSUFFIX is optional and overrides the default behaviour. For example: +dnl UTIL_CHECK_LIB(yyy, func, xxx) generates have_xxx and HAVE_LIBXXX +dnl UTIL_CHECK_LIB(yyy, func) generates have_yyy and HAVE_LIBYYY +dnl --------------------------------- +AC_DEFUN([UTIL_CHECK_LIB], [ + m4_define([suffix], m4_default([$3],$1)) + [have_]suffix=yes + m4_ifdef([$3], + [AC_CHECK_LIB([$1], [$2], [AC_DEFINE(AS_TR_CPP([HAVE_LIB]suffix), 1)], [[have_]suffix=no])], + [AC_CHECK_LIB([$1], [$2], [], [[have_]suffix=no])]) + AM_CONDITIONAL(AS_TR_CPP([HAVE_]suffix), [test [$have_]suffix = yes]) +]) + +AC_ARG_WITH([ncurses], + AS_HELP_STRING([--with-ncurses], [build with non-wide ncurses, default is wide version + (--without-ncurses disables all ncurses(w) support)]), + [], with_ncurses=auto +) +AM_CONDITIONAL(HAVE_NCURSES, false) + +if test "x$with_ncurses" != xno; then + have_ncurses=no + AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h], [ + if test "x$with_ncurses" = xauto; then + UTIL_CHECK_LIB(ncursesw, initscr, ncurses) + if test "x$have_ncurses" = xyes; then + AC_CHECK_HEADERS([ncursesw/ncurses.h]) + NCURSES_LIBS="-lncursesw" + fi + fi + if test "x$have_ncurses" = xno; then + UTIL_CHECK_LIB(ncurses, initscr) + if test "x$have_ncurses" = xyes; then + NCURSES_LIBS="-lncurses" + fi + fi + ]) + if test "x$have_ncurses" = xno; then + AC_MSG_ERROR([ncurses or ncursesw selected, but library not found (--without-ncurses to disable)]) + fi +fi +AC_SUBST([NCURSES_LIBS]) + +AC_ARG_ENABLE([oomem], + AS_HELP_STRING([--enable-oomem], [add out-of-memory fields to the library and top]), + [], enable_oomem=no +) +if test "x$enable_oomem" = xyes; then + AC_DEFINE(OOMEM_ENABLE, 1, [add out-of-memory fields to the library and top]) +fi + +AC_CONFIG_FILES([ +Makefile +proc/Makefile +ps/Makefile +]) +AC_OUTPUT diff --git a/dummy.c b/contrib/dummy.c similarity index 100% rename from dummy.c rename to contrib/dummy.c diff --git a/minimal.c b/contrib/minimal.c similarity index 100% rename from minimal.c rename to contrib/minimal.c diff --git a/tmp-junk.c b/contrib/tmp-junk.c similarity index 100% rename from tmp-junk.c rename to contrib/tmp-junk.c diff --git a/utmp.c b/contrib/utmp.c similarity index 100% rename from utmp.c rename to contrib/utmp.c diff --git a/free.c b/free.c index e485f196..d281c95f 100644 --- a/free.c +++ b/free.c @@ -1,6 +1,6 @@ /* * free.c - free(1) - * procps utility to display free memory information + * procps-ng utility to display free memory information * * Mostly new, Sami Kerola 15 Apr 2011 * All new, Robert Love 18 Nov 2002 diff --git a/kill.1 b/kill.1 index df1bdd78..5df66a14 100644 --- a/kill.1 +++ b/kill.1 @@ -103,4 +103,4 @@ Albert Cahalan wrote kill in 1999 to replace a bsdutils one that was not standards compliant. The util-linux one might also work correctly. -Please send bug reports to +Please send bug reports to diff --git a/pgrep.1 b/pgrep.1 index aca84abe..eba694bb 100644 --- a/pgrep.1 +++ b/pgrep.1 @@ -174,7 +174,4 @@ implementation is fully compatible. .SH AUTHOR Kjetil Torgrim Homme -Albert Cahalan is the current maintainer of -the procps package. - -Please send bug reports to +Please send bug reports to diff --git a/pmap.1 b/pmap.1 index 3b6dcc01..9327c6bc 100644 --- a/pmap.1 +++ b/pmap.1 @@ -37,7 +37,5 @@ lB l l. .SH STANDARDS No standards apply, but pmap looks an awful lot like a SunOS command. -.SH AUTHOR -Albert Cahalan wrote pmap in 2002, and is the current -maintainer of the procps collection. Please send bug reports -to . +.SH BUG REPORTS +Please send bug reports to diff --git a/proc/Makefile.am b/proc/Makefile.am new file mode 100644 index 00000000..391ac2b0 --- /dev/null +++ b/proc/Makefile.am @@ -0,0 +1,47 @@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +AM_CPPFLAGS = -include $(top_builddir)/config.h +lib_LTLIBRARIES = libproc-ng.la + +libproc_ng_ladir = $(ladir) +libproc_ng_la_LIBADD = $(LIB_KPARTS) +libproc_ng_la_LDFLAGS = $(all_libraries) -release $(PACKAGE_VERSION) -no-undefined + +libproc_ng_la_SOURCES = \ + alloc.c \ + alloc.h \ + devname.c \ + devname.h \ + escape.c \ + escape.h \ + ksym.c \ + procps.h \ + pwcache.c \ + pwcache.h \ + readproc.c \ + readproc.h \ + sig.c \ + sig.h \ + slab.c \ + slab.h \ + sysinfo.c \ + sysinfo.h \ + version.c \ + version.h \ + wchan.h \ + whattime.c \ + whattime.h + +libproc_ng_la_includedir = $(includedir)/proc/ +libproc_ng_la_include_HEADERS = \ + alloc.h \ + devname.h \ + escape.h \ + procps.h \ + pwcache.h \ + readproc.h \ + sig.h \ + slab.h \ + sysinfo.h \ + version.h \ + wchan.h \ + whattime.h diff --git a/proc/module.mk b/proc/module.mk deleted file mode 100644 index af203348..00000000 --- a/proc/module.mk +++ /dev/null @@ -1,130 +0,0 @@ -# This file gets included into the main Makefile, in the top directory. - -# Ideally, we want something like this: -# -# /lib/libproc.so.w ELF soname ('w' is a digit, starting from 1) -# /lib/procps-x.y.z.so file itself (x.y.z is the procps version) -# /lib/libproc.so for linking, UNSUPPORTED -# /usr/lib/libproc.a for linking, UNSUPPORTED -# proc/libproc.so.w as above, if testing with LD_LIBRARY_PATH -# proc/whatever if testing with LD_PRELOAD -# proc/libproc.a for static build -# -# Without a stable ABI, there's no point in having any of that. -# Without a stable API, there's no point in having the *.a file. -# -# A new ELF soname is required for every big ABI change. To conserve -# numbers for future use, the ELF soname can be set equal to the -# file name until some future date when a stable ABI is declared. - -SHARED := 1 - -# for lib$(NAME).so and /usr/include/($NAME) and such -NAME := proc - -LIBVERSION := $(VERSION).$(SUBVERSION).$(MINORVERSION) -ABIVERSION := 0 - -SOFILE := lib$(NAME)-$(LIBVERSION).so -ifneq ($(ABIVERSION),0) -SOLINK := lib$(NAME).so -SONAME := lib$(NAME).so.$(ABIVERSION) -else -SONAME := $(SOFILE) -SOLINK := $(SOFILE) -endif - -ANAME := lib$(NAME).a - -############ - -FPIC := -fpic - -ifeq ($(SHARED),1) -ALL += proc/$(SONAME) -INSTALL += ldconfig -LIBFLAGS := -DSHARED=1 $(FPIC) -# This is in gcc 3.5, but exported functions must be marked. -#LIBFLAGS += $(call check_gcc,-fvisibility=hidden,) -LIBPROC := proc/$(SONAME) -else -ALL += proc/$(ANAME) -#INSTALL += $(usr/lib)$(ANAME) -LIBFLAGS := -DSHARED=0 -LIBPROC := proc/$(ANAME) -endif - -LIBSRC := $(wildcard proc/*.c) -LIBHDR := $(wildcard proc/*.h) -LIBOBJ := $(LIBSRC:.c=.o) - -# Separate rule for this directory, to use -fpic or -fPIC -$(filter-out proc/version.o,$(LIBOBJ)): proc/%.o: proc/%.c - $(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(LIBFLAGS) $< -o $@ - -LIB_X := COPYING module.mk library.map -TARFILES += $(LIBSRC) $(LIBHDR) $(addprefix proc/,$(LIB_X)) - - -# Clean away all output files, .depend, and symlinks. -# Use wildcards in case the version has changed. -CLEAN += proc/.depend proc/lib*.so* proc/lib*.a $(LIBOBJ) -DIRS += proc/ - -proc/$(ANAME): $(LIBOBJ) - $(AR) rcs $@ $^ - -#proc/$(SONAME): proc/library.map -proc/$(SONAME): $(LIBOBJ) - $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc - - -# AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT -proc/.depend: $(LIBSRC) $(LIBHDR) - $(strip $(CC) $(ALL_CPPFLAGS) $(LIB_CFLAGS) -MM -MG $(LIBSRC) > $@) - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(MAKECMDGOALS),tar) -ifneq ($(MAKECMDGOALS),extratar) -ifneq ($(MAKECMDGOALS),beta) --include proc/.depend -endif -endif -endif -endif - -#################### install rules ########################### - -$(lib)$(SOFILE) : proc/$(SONAME) - $(install) --mode a=rx $< $@ - -ifneq ($(SOLINK),$(SOFILE)) -.PHONY: $(lib)$(SOLINK) -$(lib)$(SOLINK) : $(lib)$(SOFILE) - cd $(lib) && $(ln_sf) $(SOFILE) $(SOLINK) -endif - -ifneq ($(SONAME),$(SOFILE)) -.PHONY: $(lib)$(SONAME) -$(lib)$(SONAME) : $(lib)$(SOFILE) - cd $(lib) && $(ln_sf) $(SOFILE) $(SONAME) -endif - -.PHONY: ldconfig -ldconfig : $(lib)$(SONAME) $(lib)$(SOLINK) - $(ldconfig) - -$(usr/lib)$(ANAME) : proc/$(ANAME) - $(install) --mode a=r $< $@ - -# Junk anyway... supposed to go in /usr/include/$(NAME) -#INSTALL += $(addprefix $(include),$(HDRFILES)) -# -#$(addprefix $(include),$(HDRFILES)): $(include)% : proc/% -#$(include)% : proc/% -# $(install) --mode a=r $< $@ - -################################################################## - -proc/version.o: proc/version.c proc/version.h - $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(LIBFLAGS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -c -o $@ $< diff --git a/proc/procps.h b/proc/procps.h index a70e9257..42d02b45 100644 --- a/proc/procps.h +++ b/proc/procps.h @@ -78,7 +78,7 @@ #define STRINGIFY_ARG(a) #a #define STRINGIFY(a) STRINGIFY_ARG(a) -// marks old junk, to warn non-procps library users +// marks old junk, to warn non-procps-ng library users #if ( __GNUC__ == 3 && __GNUC_MINOR__ > 0 ) || __GNUC__ > 3 #define OBSOLETE __attribute__((deprecated)) #else diff --git a/proc/readproc.c b/proc/readproc.c index eef7919a..4949704e 100644 --- a/proc/readproc.c +++ b/proc/readproc.c @@ -6,9 +6,7 @@ * May be distributed under the conditions of the * GNU Library General Public License; a copy is in COPYING */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif + #include "version.h" #include "readproc.h" #include "alloc.h" diff --git a/proc/sysinfo.c b/proc/sysinfo.c index c5f3298b..5e224f12 100644 --- a/proc/sysinfo.c +++ b/proc/sysinfo.c @@ -221,7 +221,7 @@ static void old_Hertz_hack(void){ #define NOTE_NOT_FOUND 42 -//extern char** environ; +extern char** environ; /* for ELF executables, notes are pushed before environment and args */ static unsigned long find_elf_note(unsigned long findme){ diff --git a/proc/version.c b/proc/version.c index a286c1c9..e7139cc4 100644 --- a/proc/version.c +++ b/proc/version.c @@ -1,4 +1,4 @@ -/* Suite version information for procps utilities +/* Suite version information for procps-ng utilities * Copyright (c) 1995 Martin Schulze * Ammended by cblake to only export the function symbol. * @@ -7,24 +7,18 @@ * Redistributable under the terms of the * GNU Library General Public License; see COPYING */ -#ifdef HAVE_CONFIG_H -#include -#endif + #include #include #include "version.h" -#ifdef MINORVERSION -const char procps_version[] = "procps version " VERSION "." SUBVERSION "." MINORVERSION; -#else -const char procps_version[] = "procps version " VERSION "." SUBVERSION; -#endif +const char procps_version[] = PACKAGE_NAME " version " PACKAGE_VERSION; void display_version(void) { fprintf(stdout, "%s\n", procps_version); } -/* Linux kernel version information for procps utilities +/* Linux kernel version information for procps-ng utilities * Copyright (c) 1996 Charles Blake */ #include diff --git a/proc/version.h b/proc/version.h index 04a75e94..e7baa971 100644 --- a/proc/version.h +++ b/proc/version.h @@ -3,9 +3,9 @@ #include "procps.h" -/* Suite version information for procps utilities +/* Suite version information for procps-ng utilities * Copyright (c) 1995 Martin Schulze - * Linux kernel version information for procps utilities + * Linux kernel version information for procps-ng utilities * Copyright (c) 1996 Charles Blake * Distributable under the terms of the GNU Library General Public License * diff --git a/procps.lsm b/procps.lsm deleted file mode 100644 index f2b80647..00000000 --- a/procps.lsm +++ /dev/null @@ -1,15 +0,0 @@ -Begin4 -Title: procps -Version: 3.2.7 -Entered-date: 2006-06-25 -Description: Linux system utilities -Keywords: procps /proc libproc sysctl pmap ps uptime tload slabtop - free w top vmstat watch skill snice kill pgrep pkill -Author: Albert Cahalan, Michael K. Johnson, Jim Warner, etc. -Maintained-by: various -Primary-site: http://procps.sf.net/ - 281kB procps-3.2.7.tar.gz -Alternate-site: http://www.debian.org/Packages/unstable/base/procps.html - 281kB procps-3.2.7.tar.gz -Copying-policy: mixed -End diff --git a/procps.spec b/procps.spec deleted file mode 100644 index 5ac1be94..00000000 --- a/procps.spec +++ /dev/null @@ -1,52 +0,0 @@ -URL: http://procps.sf.net/ -Summary: System and process monitoring utilities -Name: procps -%define major_version 3 -%define minor_version 2 -%define revision 8 -%define version %{major_version}.%{minor_version}.%{revision} -Version: %{version} -Release: 1 -License: LGPL, GPL, BSD-like -Group: Applications/System -Source: http://procps.sf.net/procps-%{version}.tar.gz -BuildRoot: %{_tmppath}/procps-root -Packager: - -%description -The procps package contains a set of system utilities which provide -system information. Procps includes ps, free, sysctl, skill, snice, -tload, top, uptime, vmstat, w, and watch. You need some of these. - -%prep -%setup - -%build -make SKIP="/bin/kill /usr/share/man/man1/kill.1" CFLAGS="$RPM_OPT_FLAGS" - -%install -rm -rf $RPM_BUILD_ROOT -make SKIP="/bin/kill /usr/share/man/man1/kill.1" DESTDIR=$RPM_BUILD_ROOT ldconfig=echo install="install -D" lib="$RPM_BUILD_ROOT/%{_lib}/" install - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -# add libproc to the cache -/sbin/ldconfig - -%files -%defattr(0644,root,root,755) -%doc NEWS BUGS TODO COPYING COPYING.LIB README.top README AUTHORS sysctl.conf -%attr(555,root,root) /lib*/libproc*.so* -%attr(555,root,root) /bin/* -%attr(555,root,root) /sbin/* -%attr(555,root,root) /usr/bin/* - -%attr(0644,root,root) /usr/share/man/man1/* -%attr(0644,root,root) /usr/share/man/man5/* -%attr(0644,root,root) /usr/share/man/man8/* - -%changelog -* Fri Apr 14 09:23:45 PDT 2006 Jesse Brandeburg -- fix missing trailing slash in %install to fix builds on x86_64 diff --git a/ps/Makefile.am b/ps/Makefile.am new file mode 100644 index 00000000..ced42f23 --- /dev/null +++ b/ps/Makefile.am @@ -0,0 +1,28 @@ +AM_CPPFLAGS = -include $(top_builddir)/config.h + +AM_CFLAGS = -I../proc +AM_LDFLAGS = ../proc/libproc-ng.la + +dist_man_MANS = ps.1 + +# Use `ginstall' in the definition of PROGRAMS and in dependencies to avoid +# confusion with the `install' target. The install rule transforms `ginstall' +# to install before applying any user-specified name transformations. +transform = s/pscommand/ps/; $(program_transform_name) +bin_PROGRAMS = pscommand +pscommand_SOURCES = \ + common.h \ + display.c \ + global.c \ + help.c \ + output.c \ + parser.c \ + select.c \ + sortformat.c \ + stacktrace.c + +EXTRA_DIST = \ + HACKING \ + it \ + regression \ + TRANSLATION diff --git a/ps/display.c b/ps/display.c index 78685c40..0c5e6753 100644 --- a/ps/display.c +++ b/ps/display.c @@ -46,7 +46,7 @@ static void signal_handler(int signo){ fprintf(stderr, "\n\n" "Signal %d (%s) caught by ps (%s).\n" - "Please send bug reports to or \n", + "Please send bug reports to \n", signo, signal_number_to_name(signo), procps_version diff --git a/ps/module.mk b/ps/module.mk deleted file mode 100755 index 2902a3aa..00000000 --- a/ps/module.mk +++ /dev/null @@ -1,40 +0,0 @@ -# This file gets included into the main Makefile, in the top directory. - -INSTALL += $(bin)ps $(man1)ps.1 - -# files to remove -CLEAN += ps/ps ps/debug - -# a directory for cleaning -DIRS += ps/ - -# a file to create -ALL += ps/ps - -PS_C := display global help output parser select sortformat -PSNAMES := $(addprefix ps/,$(PS_C)) -PSOBJ := $(addsuffix .o,$(PSNAMES)) -PSSRC := $(addsuffix .c,$(PSNAMES)) - -PS_X := COPYING HACKING TRANSLATION common.h module.mk it p ps.1 regression -TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X)) - -ps/ps: $(PSOBJ) $(LIBPROC) - $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ $(ldl) - -# This just adds the stacktrace code -ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC) - $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ -lefence $(ldl) - -$(PSOBJ): %.o: %.c ps/common.h $(LIBPROC) - $(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< -o $@ - -ps/stacktrace.o: ps/stacktrace.c - - -$(bin)ps: ps/ps - $(install) --mode a=rx $< $@ - -$(man1)ps.1 : ps/ps.1 - $(install) --mode a=r $< $@ - -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz diff --git a/ps/p b/ps/p deleted file mode 100755 index 10064fa3..00000000 --- a/ps/p +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Wow, using $* causes great pain with: ps "pid,user pcpu,pmem" -# The "$@" won't break that into 2 arguments. -# -LD_LIBRARY_PATH=../proc exec ./ps "$@" diff --git a/ps/parser.c b/ps/parser.c index dfdf6dbc..3e8f8875 100644 --- a/ps/parser.c +++ b/ps/parser.c @@ -1160,7 +1160,7 @@ static const char *thread_option_check(void){ if(thread_flags&(TF_B_m|TF_U_m|TF_B_H)){ // Got a thread style, so format modification is a requirement? // Maybe -T/-L has H thread style though. (sorting interaction?) - //return "Huh? Tell procps-feedback@lists.sf.net what you expected."; + //return "Huh? Tell procps@freelists.org what you expected."; thread_flags |= TF_must_use; }else{ // using -L/-T thread style, so format from elsewhere is OK @@ -1232,7 +1232,7 @@ try_bsd: // out the friendly warning. Cut-over is likely to be in 2005. if(!(personality & PER_FORCE_BSD)) fprintf(stderr, "Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html\n"); - // Remember: contact albert@users.sf.net or procps-feedback@lists.sf.net + // Remember: contact procps@freelists.org // if you should feel tempted. Be damn sure you understand all // the issues. The same goes for other stuff too, BTW. Please ask. // I'm happy to justify various implementation choices. diff --git a/ps/ps.1 b/ps/ps.1 index ad29415e..1fd6e094 100644 --- a/ps/ps.1 +++ b/ps/ps.1 @@ -643,13 +643,13 @@ Print debugging info. List all format specifiers. .opt V -Print the procps version. +Print the procps-ng version. .opt \-V -Print the procps version. +Print the procps-ng version. .opt \-\-version -Print the procps version. +Print the procps-ng version. .\" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .PD @@ -1565,5 +1565,5 @@ Mossberger\-Tang wrote the generic BFD support for psupdate. Albert Cahalan rewrote ps for full Unix98 and BSD support, along with some ugly hacks for obsolete and foreign syntax. -Please send bug reports to . +Please send bug reports to . No\ subscription is required or suggested. diff --git a/ps/sortformat.c b/ps/sortformat.c index 80427e55..36d5d435 100644 --- a/ps/sortformat.c +++ b/ps/sortformat.c @@ -800,7 +800,7 @@ const char *process_sf_options(int localbroken){ // with sorting. Do the threads remain grouped, with sorting // by process, or do the threads get sorted by themselves? if(sort_list && (thread_flags&TF_no_sort)){ - return "Tell procps-feedback@lists.sf.net what you expected."; + return "Tell procps@freelists.org what you expected."; } // If nothing else, try to use $PS_FORMAT before the default. @@ -810,7 +810,7 @@ const char *process_sf_options(int localbroken){ if(tmp && *tmp){ const char *err; sf_node sfn; - if(thread_flags&TF_must_use) return "Tell procps-feedback@sf.net what you want. (-L/-T, -m/m/H, and $PS_FORMAT)"; + if(thread_flags&TF_must_use) return "Tell procps@freelists.org what you want. (-L/-T, -m/m/H, and $PS_FORMAT)"; sfn.sf = tmp; sfn.f_cooked = NULL; err = format_parse(&sfn); diff --git a/pwdx.1 b/pwdx.1 index 728157d5..8491fefa 100644 --- a/pwdx.1 +++ b/pwdx.1 @@ -34,4 +34,4 @@ No standards apply, but pwdx looks an awful lot like a SunOS command. .SH AUTHOR Nicholas Miell wrote pwdx in 2004. Please send bug -reports to . +reports to diff --git a/skill.1 b/skill.1 index bc4846f6..9289cc19 100644 --- a/skill.1 +++ b/skill.1 @@ -124,5 +124,6 @@ No standards apply. .SH AUTHOR Albert Cahalan wrote skill and snice in 1999 as a -replacement for a non-free version, and is the current maintainer of the -procps collection. Please send bug reports to . +replacement for a non-free version. + +Please send bug reports to . diff --git a/slabtop.1 b/slabtop.1 index 7e27980b..08d8ec5e 100644 --- a/slabtop.1 +++ b/slabtop.1 @@ -1,4 +1,4 @@ -.\" slabtop.1 - manpage for the slabtop(1) utility, part of procps +.\" slabtop.1 - manpage for the slabtop(1) utility, part of procps-ng .\" .\" Copyright (C) 2003 Chris Rivera .\" Licensed under the terms of the GNU Library General Public License, v2 @@ -124,6 +124,4 @@ Written by Chris Rivera and Robert Love. .B slabtop was inspired by Martin Bligh's perl script, .BR vmtop . -The procps package is maintained by Albert Cahalan . - -Please send bug reports to . +Please send bug reports to . diff --git a/sysctl.c b/sysctl.c index 9be79ce1..57d3e9aa 100644 --- a/sysctl.c +++ b/sysctl.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "proc/procps.h" #include "proc/version.h" diff --git a/t b/t deleted file mode 100755 index 3842ee03..00000000 --- a/t +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Wow, using $* causes great pain with embedded spaces in arguments. -# The "$@" won't break that into 2 arguments. -# -LD_LIBRARY_PATH=proc exec ./top "$@" diff --git a/uptime.1 b/uptime.1 index a3da7c7c..c635f950 100644 --- a/uptime.1 +++ b/uptime.1 @@ -39,7 +39,7 @@ process information was written by Larry Greenfield and Michael K. Johnson . -Please send bug reports to +Please send bug reports to .SH "SEE ALSO" .BR ps (1), .BR top (1), diff --git a/v b/v deleted file mode 100755 index f23230b5..00000000 --- a/v +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# -# Wow, using $* causes great pain with embedded spaces in arguments. -# The "$@" won't break that into 2 arguments. -# -LD_LIBRARY_PATH=proc exec ./vmstat "$@" diff --git a/w.1 b/w.1 index 0238baf0..d35be87c 100644 --- a/w.1 +++ b/w.1 @@ -81,4 +81,4 @@ was re-written almost entirely by Charles Blake, based on the version by Larry Greenfield and Michael K. Johnson . -Please send bug reports to +Please send bug reports to diff --git a/watch.c b/watch.c index 58411685..1e050dc6 100644 --- a/watch.c +++ b/watch.c @@ -10,8 +10,6 @@ * Changes by Albert Cahalan, 2002-2003. */ -#define VERSION "0.2.0" - #include #include #include @@ -25,6 +23,7 @@ #include #include #include "proc/procps.h" +#include "config.h" #ifdef FORCE_8BIT #undef isprint @@ -184,7 +183,7 @@ main(int argc, char *argv[]) } if (option_version) { - fprintf(stderr, "%s\n", VERSION); + fprintf(stderr, "%s\n", PACKAGE_NAME " version " PACKAGE_VERSION); if (!option_help) exit(0); }