diff options
author | sergei <sergei@FreeBSD.org> | 2003-12-13 08:25:50 +0800 |
---|---|---|
committer | sergei <sergei@FreeBSD.org> | 2003-12-13 08:25:50 +0800 |
commit | d9c3214d2095212e38ac9378bada3bc8145852eb (patch) | |
tree | 06090b19fb2dfeabac34651b7bdb623dead50bd2 /editors/zed | |
parent | f63b64a02664f920bbacd2a10cf726c2bc8460a9 (diff) | |
download | freebsd-ports-gnome-d9c3214d2095212e38ac9378bada3bc8145852eb.tar.gz freebsd-ports-gnome-d9c3214d2095212e38ac9378bada3bc8145852eb.tar.zst freebsd-ports-gnome-d9c3214d2095212e38ac9378bada3bc8145852eb.zip |
- Add patch which remedies the problem of Zombie childs upon
using the built-in shell/make utility which uses fork()
- Switch to do-install target, respect ${PREFIX}
- Bump PORTREVISION
PR: 59760
Submitted by: maintainer
Diffstat (limited to 'editors/zed')
-rw-r--r-- | editors/zed/Makefile | 14 | ||||
-rw-r--r-- | editors/zed/files/patch-main.cc | 61 | ||||
-rw-r--r-- | editors/zed/pkg-plist | 8 |
3 files changed, 77 insertions, 6 deletions
diff --git a/editors/zed/Makefile b/editors/zed/Makefile index b91fd2b837ea..dbdaccb01021 100644 --- a/editors/zed/Makefile +++ b/editors/zed/Makefile @@ -7,13 +7,21 @@ PORTNAME= zed PORTVERSION= 1.0.5 +PORTREVISION= 1 CATEGORIES= editors MASTER_SITES= http://zed.c3po.it/ MAINTAINER= exile@chamber.ee -COMMENT= Simple, fast, powerful, small, highly configurable TEXT EDITOR +COMMENT= Simple, small, fast, highly configurable text editor -post-install: - @${STRIP_CMD} ${PREFIX}/bin/zed +DOCS= CHANGES zed.doc + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/zed ${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/cfg/zedrc ${PREFIX}/etc/zedrc.sample +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} +.endif .include <bsd.port.mk> diff --git a/editors/zed/files/patch-main.cc b/editors/zed/files/patch-main.cc new file mode 100644 index 000000000000..7b18f79b56ee --- /dev/null +++ b/editors/zed/files/patch-main.cc @@ -0,0 +1,61 @@ +--- main.cc.orig Fri Nov 28 16:17:58 2003 ++++ main.cc Fri Nov 28 14:44:27 2003 +@@ -25,6 +25,7 @@ + #include <unistd.h> + #include <signal.h> + #include <regex.h> ++#include <errno.h> + #ifdef X11 + #include <X11/Xlib.h> + #endif +@@ -91,6 +92,8 @@ + + /***************************************************************************/ + ++int fork2(); ++ + void resetcfg(int flag,char *str) + { + if (config.keys==(unsigned int *)0xffffffff) config.keys=0; +@@ -554,7 +557,7 @@ + + if (piped) pipe(pp); else deinit(); // ripristino i settaggi del terminale + +- if ((pid=fork())==0) ++ if ((pid=fork2())==0) + { // figlio + char *argv[100]; + int argc=0; +@@ -1352,6 +1355,32 @@ + deinit(); + + return(0); ++} ++ ++int fork2() { ++ pid_t pid; ++ int status; ++ ++ if (!(pid = fork())) { ++ switch (fork()) { ++ case 0: return 0; ++ case -1: _exit(errno); /* assumes all errnos are <256 */ ++ default: _exit(0); ++ } ++ } ++ ++ if (pid < 0 || waitpid(pid,&status,0) < 0) ++ return -1; ++ ++ if (WIFEXITED(status)) ++ if (WEXITSTATUS(status) == 0) ++ return 1; ++ else ++ errno = WEXITSTATUS(status); ++ else ++ errno = EINTR; /* well, sort of :-) */ ++ ++ return -1; + } + + /***************************************************************************/ diff --git a/editors/zed/pkg-plist b/editors/zed/pkg-plist index 8f24ace15d30..c485e4a6246f 100644 --- a/editors/zed/pkg-plist +++ b/editors/zed/pkg-plist @@ -1,4 +1,6 @@ +@comment $FreeBSD$ bin/zed -etc/zedrc -share/doc/zed/zed.doc -@dirrm share/doc/zed +etc/zedrc.sample +%%PORTDOCS%%%%DOCSDIR%%/CHANGES +%%PORTDOCS%%%%DOCSDIR%%/zed.doc +%%PORTDOCS%%@dirrm %%DOCSDIR%% |