summaryrefslogtreecommitdiff
path: root/net-wireless/aircrack-ng
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2013-07-05 16:33:23 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2013-07-05 16:33:23 +0300
commit4cece4799d5a98e5c4dae9f2b2081dd9f298f9c6 (patch)
treef14972992b2a578ceee95ab3ea5d4932ee35229e /net-wireless/aircrack-ng
parenta21d76907d4687cf3136422577fd747e5de6e5a8 (diff)
cleanup
Diffstat (limited to 'net-wireless/aircrack-ng')
-rw-r--r--net-wireless/aircrack-ng/aircrack-ng-9999.ebuild75
-rw-r--r--net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch108
-rw-r--r--net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch91
-rw-r--r--net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc4-fix_build.patch11
-rw-r--r--net-wireless/aircrack-ng/files/aircrack-ng-9999-respect_LDFLAGS.patch91
-rw-r--r--net-wireless/aircrack-ng/files/process-group-leader.c26
6 files changed, 0 insertions, 402 deletions
diff --git a/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild b/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild
deleted file mode 100644
index 2ee104e..0000000
--- a/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/aircrack-ng-1.1.ebuild,v 1.1 2010/04/29 21:12:40 arfrever Exp $
-
-EAPI="3"
-
-inherit eutils flag-o-matic toolchain-funcs versionator subversion
-
-MY_PV="$(replace_version_separator 2 '-')"
-
-DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys"
-HOMEPAGE="http://www.aircrack-ng.org"
-SRC_URI=""
-
-ESVN_REPO_URI="http://trac.aircrack-ng.org/svn/trunk"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS=""
-IUSE="+sqlite kernel_linux kernel_FreeBSD"
-
-DEPEND="dev-libs/openssl
- sqlite? ( >=dev-db/sqlite-3.4 )"
-RDEPEND="${DEPEND}
- kernel_linux? ( net-wireless/iw net-wireless/wireless-tools )"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-have_sqlite() {
- use sqlite && echo "true" || echo "false"
-}
-
-pkg_setup() {
- # aircrack-ng fails to build with -fPIE.
- filter-flags -fPIE
-}
-
-src_prepare() {
-# epatch "${FILESDIR}/${P}-respect_LDFLAGS.patch"
- epatch "${FILESDIR}/${PN}-1.0_rc4-fix_build.patch"
-}
-
-src_compile() {
- # UNSTABLE=true enables building of buddy-ng, easside-ng, tkiptun-ng and wesside-ng
- emake CC="$(tc-getCC)" LD="$(tc-getLD)" sqlite="$(have_sqlite)" UNSTABLE=true || die "emake failed"
-}
-
-src_install() {
- # UNSTABLE=true enables installation of buddy-ng, easside-ng, tkiptun-ng and wesside-ng
- emake \
- prefix="${EPREFIX}/usr" \
- mandir="${EPREFIX}/usr/share/man/man1" \
- DESTDIR="${D}" \
- sqlite="$(have_sqlite)" \
- UNSTABLE=true \
- install \
- || die "emake install failed"
-
- dodoc AUTHORS ChangeLog README
-}
-
-pkg_postinst() {
- # Message is (c) FreeBSD
- # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5
- if use kernel_FreeBSD ; then
- einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor"
- einfo "mode of your wireless card. So do not care about what the manpages say about"
- einfo "airmon-ng, airodump-ng sets monitor mode automatically."
- echo
- einfo "To return from monitor mode, issue the following command:"
- einfo " ifconfig \${INTERFACE} -mediaopt monitor"
- einfo
- einfo "For aireplay-ng you need FreeBSD >= 7.0."
- fi
-}
diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch
deleted file mode 100644
index e3e0eba..0000000
--- a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc2-freebsd.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/patch-src_airserv-ng.c?rev=1.1
---- src/airserv-ng.c.orig 2008-06-10 02:55:09.000000000 +0700
-+++ src/airserv-ng.c 2008-08-11 13:39:46.000000000 +0700
-@@ -37,6 +37,15 @@
-
- #ifdef __MACH__
- #include <libkern/OSByteOrder.h>
-+#elif defined(__FreeBSD__)
-+#include <machine/endian.h>
-+#if BYTE_ORDER == BIG_ENDIAN
-+# define __cpu_to_be32(x) (x)
-+# define __cpu_to_be64(x) (x)
-+#elif BYTE_ORDER == LITTLE_ENDIAN
-+# define __cpu_to_be32(x) __bswap32(x)
-+# define __cpu_to_be64(x) __bswap64(x)
-+#endif
- #else
- #include <asm/byteorder.h>
- #endif /* __MACH__ */
-
-
-http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/patch-src_osdep_network.c?rev=1.1
---- src/osdep/network.c.orig 2008-06-10 02:55:09.000000000 +0700
-+++ src/osdep/network.c 2008-08-11 13:29:42.000000000 +0700
-@@ -32,6 +32,15 @@
-
- #ifdef __MACH__
- #include <libkern/OSByteOrder.h>
-+#elif defined(__FreeBSD__)
-+#include <machine/endian.h>
-+#if BYTE_ORDER == BIG_ENDIAN
-+# define __be32_to_cpu(x) (x)
-+# define __be64_to_cpu(x) (x)
-+#elif BYTE_ORDER == LITTLE_ENDIAN
-+# define __be32_to_cpu(x) __bswap32(x)
-+# define __be64_to_cpu(x) __bswap64(x)
-+#endif
- #elif defined (__sun) && defined (__sparc) /* Solaris SPARC, not Solaris x86 */
- #include <sys/byteorder.h>
- #else
-
-
-http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c?rev=1.1
---- src/osdep/freebsd.c.orig 2008-06-10 02:55:09.000000000 +0700
-+++ src/osdep/freebsd.c 2008-08-11 20:01:53.000000000 +0700
-@@ -53,7 +53,9 @@
- unsigned char pf_buf[4096];
- unsigned char *pf_next;
- int pf_totlen;
-+#if __FreeBSD_version > 700018
- struct ieee80211_bpf_params pf_txparams;
-+#endif
-
- /* setchan */
- int pf_s;
-@@ -280,13 +282,16 @@
- static int fbsd_write(struct wif *wi, unsigned char *h80211, int len,
- struct tx_info *ti)
- {
-+#if __FreeBSD_version > 700018
- struct iovec iov[2];
-+#endif
- struct priv_fbsd *pf = wi_priv(wi);
- int rc;
-
- /* XXX make use of ti */
- if (ti) {}
-
-+#if __FreeBSD_version > 700018
- iov[0].iov_base = &pf->pf_txparams;
- iov[0].iov_len = pf->pf_txparams.ibp_len;
-
-@@ -294,12 +299,19 @@
- iov[1].iov_len = len;
-
- rc = writev(pf->pf_fd, iov, 2);
-+#else
-+ rc = write(pf->pf_fd, h80211, len);
-+#endif
- if (rc == -1)
- return rc;
-+#if __FreeBSD_version > 700018
- if (rc < (int) iov[0].iov_len)
- return 0;
-
- return rc - iov[0].iov_len;
-+#else
-+ return 0;
-+#endif
- }
-
- static int fbsd_set_channel(struct wif *wi, int chan)
-@@ -542,6 +554,7 @@
- /* setup private state */
- pf = wi_priv(wi);
- pf->pf_fd = fd;
-+#if __FreeBSD_version > 700018
- pf->pf_txparams.ibp_vers = IEEE80211_BPF_VERSION;
- pf->pf_txparams.ibp_len = sizeof(struct ieee80211_bpf_params) - 6;
- pf->pf_txparams.ibp_rate1 = 2; /* 1 MB/s XXX */
-@@ -549,6 +562,7 @@
- pf->pf_txparams.ibp_flags = IEEE80211_BPF_NOACK;
- pf->pf_txparams.ibp_power = 100; /* nominal max */
- pf->pf_txparams.ibp_pri = WME_AC_VO; /* high priority */
-+#endif
-
- return wi;
- }
diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch
deleted file mode 100644
index 2e5e4d0..0000000
--- a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- src/Makefile
-+++ src/Makefile
-@@ -93,13 +93,13 @@
-
-
- OSD = osdep
--LIBS = -L$(OSD) -l$(OSD) $(LIBPCAP) $(LDFLAGS)
-+LIBS = -L$(OSD) -l$(OSD) $(LIBPCAP)
- ifeq ($(OSNAME), cygwin)
- LIBS += -liphlpapi -lsetupapi -luuid
- endif
- LIBOSD = $(OSD)/lib$(OSD).a
-
--LIBSSL = -lssl -lcrypto $(LDFLAGS)
-+LIBSSL = -lssl -lcrypto
- LIBSQL =
- ifeq ($(SQLITE), true)
- LIBSQL = -L/usr/local/lib -lsqlite3
-@@ -143,55 +143,55 @@
- aircrack-ng-opt-prof -lpthread $(LIBSQL)
-
- aircrack-ng$(EXE): $(OBJS_AC)
-- $(CC) $(CFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL)
-
- airdecap-ng$(EXE): $(OBJS_AD)
-- $(CC) $(CFLAGS) $(OBJS_AD) -o $(@) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AD) -o $(@) $(LIBSSL)
-
- packetforge-ng$(EXE): $(OBJS_PF)
-- $(CC) $(CFLAGS) $(OBJS_PF) -o $(@) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_PF) -o $(@) $(LIBSSL)
-
- aireplay-ng$(EXE): $(OBJS_AR) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AR) -o $(@) $(LIBS) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AR) -o $(@) $(LIBS) $(LIBSSL)
-
- airodump-ng$(EXE): $(OBJS_ADU) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL)
-
- airserv-ng$(EXE): $(OBJS_AS) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AS) -o $(@) $(LIBS) $(LIBPCAP)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AS) -o $(@) $(LIBS) $(LIBPCAP)
-
- airtun-ng$(EXE): $(OBJS_AT) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AT) -o $(@) $(LIBS) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AT) -o $(@) $(LIBS) $(LIBSSL)
-
- ivstools$(EXE): $(OBJS_IV)
-- $(CC) $(CFLAGS) $(OBJS_IV) -o $(@) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_IV) -o $(@) $(LIBSSL)
-
- kstats$(EXE): kstats.o
-- $(CC) $(CFLAGS) kstats.o -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) kstats.o -o $(@)
-
- wesside-ng$(EXE): $(OBJS_WS) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_WS) -o $(@) $(LIBS) $(LIBSSL) -lz
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_WS) -o $(@) $(LIBS) $(LIBSSL) -lz
-
- easside-ng$(EXE): $(OBJS_ES) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_ES) -o $(@) $(LIBS) -lz
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ES) -o $(@) $(LIBS) -lz
-
- buddy-ng$(EXE): $(OBJS_BUDDY)
-- $(CC) $(CFLAGS) $(OBJS_BUDDY) -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_BUDDY) -o $(@)
-
- makeivs-ng$(EXE): $(OBJS_MI)
-- $(CC) $(CFLAGS) $(OBJS_MI) -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_MI) -o $(@)
-
- airolib-ng$(EXE): $(OBJS_AL)
-- $(CC) $(CFLAGS) $(OBJS_AL) -o $(@) $(LIBSSL) -DHAVE_REGEXP $(LIBSQL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AL) -o $(@) $(LIBSSL) -DHAVE_REGEXP $(LIBSQL)
-
- airbase-ng$(EXE): $(OBJS_AB) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL) -lpthread
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL) -lpthread
-
- airdecloak-ng$(EXE): $(OBJS_AU)
-- $(CC) $(CFLAGS) $(OBJS_AU) -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AU) -o $(@)
-
- tkiptun-ng$(EXE): $(OBJS_TT) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_TT) -o $(@) $(LIBS) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_TT) -o $(@) $(LIBS) $(LIBSSL)
-
- strip: $(BINFILES) $(SBINFILES)
- strip $(BINFILES) $(SBINFILES)
diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc4-fix_build.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc4-fix_build.patch
deleted file mode 100644
index a01b682..0000000
--- a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc4-fix_build.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/osdep/radiotap/ieee80211_radiotap.h
-+++ src/osdep/radiotap/ieee80211_radiotap.h
-@@ -38,6 +38,8 @@
- #ifndef IEEE80211RADIOTAP_H
- #define IEEE80211RADIOTAP_H
-
-+#include <sys/types.h>
-+
- /* Radiotap header version (from official NetBSD feed) */
- #define IEEE80211RADIOTAP_VERSION "1.5"
- /* Base version of the radiotap packet header data */
diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-9999-respect_LDFLAGS.patch b/net-wireless/aircrack-ng/files/aircrack-ng-9999-respect_LDFLAGS.patch
deleted file mode 100644
index b7358b3..0000000
--- a/net-wireless/aircrack-ng/files/aircrack-ng-9999-respect_LDFLAGS.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- src/Makefile
-+++ src/Makefile
-@@ -90,13 +90,13 @@
-
-
- OSD = osdep
--LIBS = -L$(OSD) -l$(OSD) $(LIBPCAP) $(LDFLAGS)
-+LIBS = -L$(OSD) -l$(OSD) $(LIBPCAP)
- ifeq ($(OSNAME), cygwin)
- LIBS += -liphlpapi -lsetupapi -luuid
- endif
- LIBOSD = $(OSD)/lib$(OSD).a
-
--LIBSSL = -lssl -lcrypto $(LDFLAGS)
-+LIBSSL = -lssl -lcrypto
- LIBSQL =
- ifeq ($(SQLITE), true)
- LIBSQL = -L/usr/local/lib -lsqlite3
-@@ -140,55 +140,55 @@
- aircrack-ng-opt-prof -lpthread $(LIBSQL)
-
- aircrack-ng$(EXE): $(OBJS_AC)
-- $(CC) $(CFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL)
-
- airdecap-ng$(EXE): $(OBJS_AD)
-- $(CC) $(CFLAGS) $(OBJS_AD) -o $(@) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AD) -o $(@) $(LIBSSL)
-
- packetforge-ng$(EXE): $(OBJS_PF)
-- $(CC) $(CFLAGS) $(OBJS_PF) -o $(@) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_PF) -o $(@) $(LIBSSL)
-
- aireplay-ng$(EXE): $(OBJS_AR) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AR) -o $(@) $(LIBS) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AR) -o $(@) $(LIBS) $(LIBSSL)
-
- airodump-ng$(EXE): $(OBJS_ADU) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL) -lpthread
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL) -lpthread
-
- airserv-ng$(EXE): $(OBJS_AS) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AS) -o $(@) $(LIBS) $(LIBPCAP)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AS) -o $(@) $(LIBS) $(LIBPCAP)
-
- airtun-ng$(EXE): $(OBJS_AT) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AT) -o $(@) $(LIBS) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AT) -o $(@) $(LIBS) $(LIBSSL)
-
- ivstools$(EXE): $(OBJS_IV)
-- $(CC) $(CFLAGS) $(OBJS_IV) -o $(@) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_IV) -o $(@) $(LIBSSL)
-
- kstats$(EXE): kstats.o
-- $(CC) $(CFLAGS) kstats.o -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) kstats.o -o $(@)
-
- wesside-ng$(EXE): $(OBJS_WS) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_WS) -o $(@) $(LIBS) $(LIBSSL) -lz
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_WS) -o $(@) $(LIBS) $(LIBSSL) -lz
-
- easside-ng$(EXE): $(OBJS_ES) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_ES) -o $(@) $(LIBS) -lz
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ES) -o $(@) $(LIBS) -lz
-
- buddy-ng$(EXE): $(OBJS_BUDDY)
-- $(CC) $(CFLAGS) $(OBJS_BUDDY) -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_BUDDY) -o $(@)
-
- makeivs-ng$(EXE): $(OBJS_MI)
-- $(CC) $(CFLAGS) $(OBJS_MI) -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_MI) -o $(@)
-
- airolib-ng$(EXE): $(OBJS_AL)
-- $(CC) $(CFLAGS) $(OBJS_AL) -o $(@) $(LIBSSL) -DHAVE_REGEXP $(LIBSQL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AL) -o $(@) $(LIBSSL) -DHAVE_REGEXP $(LIBSQL)
-
- airbase-ng$(EXE): $(OBJS_AB) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL) -lpthread
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL) -lpthread
-
- airdecloak-ng$(EXE): $(OBJS_AU)
-- $(CC) $(CFLAGS) $(OBJS_AU) -o $(@)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AU) -o $(@)
-
- tkiptun-ng$(EXE): $(OBJS_TT) $(LIBOSD)
-- $(CC) $(CFLAGS) $(OBJS_TT) -o $(@) $(LIBS) $(LIBSSL)
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_TT) -o $(@) $(LIBS) $(LIBSSL)
-
- strip: $(BINFILES) $(SBINFILES)
- strip $(BINFILES) $(SBINFILES)
diff --git a/net-wireless/aircrack-ng/files/process-group-leader.c b/net-wireless/aircrack-ng/files/process-group-leader.c
deleted file mode 100644
index 4abdccc..0000000
--- a/net-wireless/aircrack-ng/files/process-group-leader.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <unistd.h>
-#include <sys/signal.h>
-#include <sys/wait.h>
-#include <stdlib.h>
-
-int main (int argc, char *argv[]) {
- pid_t pid;
-
- signal (SIGQUIT, SIG_IGN);
- signal (SIGTERM, SIG_IGN);
- setpgid (0, 0);
-
- pid=fork ();
- if (pid == 0) {
- int status;
- wait (&status);
- exit (WEXITSTATUS(status));
- }
- else {
- execv (argv[1], &argv[1]);
- exit (1);
- }
-
- return 0;
-}
-