Date: Fri, 28 Nov 2003 16:40:55 +0200 (EET) From: Sten Poldma <exile@chamber.ee> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/59760: [maintainer update] Port change: zed Message-ID: <200311281440.hASEetRQ016578@vault.chamber.ee> Resent-Message-ID: <200311281450.hASEoK6g070235@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 59760 >Category: ports >Synopsis: [maintainer update] Port change: zed >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Nov 28 06:50:19 PST 2003 >Closed-Date: >Last-Modified: >Originator: Sten Poldma >Release: FreeBSD 4.9-STABLE i386 >Organization: >Environment: System: FreeBSD vault.chamber.ee 4.9-STABLE FreeBSD 4.9-STABLE #2: Tue Nov 25 19:28:26 EET 2003 exile@vault.chamber.ee:/usr/obj/usr/src/sys/VAULT i386 >Description: Change in port: zed console text editor, highly configurable. Current version of the port has problem of applying patch-zed.h possible change in the original packet. Additionally FreeBSD specific fix was done to main.cc which remedies the problem of Zombie childs upon using the built in shell/make utility which uses fork(). o Pumped the portrevision. o Added last modification time to Makefile Tested under FreeBSD-4.x branch, no idea about 5.x >How-To-Repeat: Current port refused to cleanly apply patches >Fix: # Enclosed is the diff file against the old port --- zed.diff-1.0.5_1 begins here --- diff -ruN zed.bak/Makefile zed/Makefile --- zed.bak/Makefile Tue Feb 25 22:34:23 2003 +++ zed/Makefile Fri Nov 28 12:30:31 2003 @@ -1,5 +1,6 @@ # New ports collection makefile for: zed # Date created: 4 June 2002 +# Last modified: 28 November 2003 # Whom: Sten Poldma # # $FreeBSD: ports/editors/zed/Makefile,v 1.4 2003/02/21 11:38:28 knu Exp $ @@ -7,6 +8,7 @@ PORTNAME= zed PORTVERSION= 1.0.5 +PORTREVISION= 1 CATEGORIES= editors MASTER_SITES= http://zed.c3po.it/ diff -ruN zed.bak/files/patch-main.cc zed/files/patch-main.cc --- zed.bak/files/patch-main.cc Thu Jan 1 03:00:00 1970 +++ zed/files/patch-main.cc Fri Nov 28 16:18:33 2003 @@ -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 -ruN zed.bak/files/patch-zed.h zed/files/patch-zed.h --- zed.bak/files/patch-zed.h Fri Nov 28 10:27:09 2003 +++ zed/files/patch-zed.h Fri Nov 28 10:37:14 2003 @@ -1,13 +1,11 @@ ---- zed.h.orig Sun Nov 17 22:35:46 2002 -+++ zed.h Sun Nov 17 22:35:09 2002 -@@ -123,8 +123,8 @@ +--- zed.h Fri Nov 28 10:31:49 2003 ++++ zed.h.new Fri Nov 28 10:32:57 2003 +@@ -123,7 +123,7 @@ int lung; char dati[0]; // puntatore ai dati - friend editor; // solo pero' all'interno di ZED.H -- friend list; + friend class editor; // solo pero' all'interno di ZED.H -+ friend class list; + friend class list; }; - protected: --- zed.diff-1.0.5_1 ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311281440.hASEetRQ016578>