From jylefort@brutele.be  Thu Jan 26 03:29:26 2006
Return-Path: <jylefort@brutele.be>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5E51016A420
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Jan 2006 03:29:26 +0000 (GMT)
	(envelope-from jylefort@brutele.be)
Received: from host-212-68-242-42.brutele.be (host-212-68-242-42.brutele.be [212.68.242.42])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8C20843D45
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Jan 2006 03:29:25 +0000 (GMT)
	(envelope-from jylefort@brutele.be)
Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2])
	by gateway.lefort.net (Postfix) with ESMTP id BD62954CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 26 Jan 2006 04:29:23 +0100 (CET)
Received: by jsite.lefort.net (Postfix, from userid 1000)
	id 7CFBCC14B; Thu, 26 Jan 2006 04:29:23 +0100 (CET)
Message-Id: <20060126032923.7CFBCC14B@jsite.lefort.net>
Date: Thu, 26 Jan 2006 04:29:23 +0100 (CET)
From: Jean-Yves Lefort <jylefort@FreeBSD.org>
Reply-To: Jean-Yves Lefort <jylefort@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Enjoin to use the sh exec statement in the Porter's Handbook
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         92342
>Category:       docs
>Synopsis:       Enjoin to use the sh exec statement in the Porter's Handbook
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 26 03:30:10 GMT 2006
>Closed-Date:    Thu Feb 23 13:43:03 GMT 2006
>Last-Modified:  Thu Feb 23 13:43:03 GMT 2006
>Originator:     Jean-Yves Lefort
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD jsite.lefort.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Wed Jan 25 19:57:13 CET 2006 jylefort@jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386
>Description:
A grammar/spelling review is recommended.
>How-To-Repeat:
>Fix:
Index: book.sgml
===================================================================
RCS file: /home/dcvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v
retrieving revision 1.673
diff -u -r1.673 book.sgml
--- book.sgml	22 Jan 2006 23:20:29 -0000	1.673
+++ book.sgml	26 Jan 2006 03:25:20 -0000
@@ -9227,6 +9227,26 @@
 	  for their files.</para>
       </sect1>
 
+      <sect1 id="dads-sh-exec">
+	<title>Use the <function>exec</function> statement in wrapper scripts</title>
+
+	<para>If the port installs a shell script whose purpose is to launch
+	  another program, and if launching that program is the last action
+	  performed by the script, make sure to modify the script so that
+	  it launches the program using the <function>exec</function>
+	  statement, for instance:</para>
+
+	<programlisting>#!/bin/sh
+exec %%LOCALBASE%%/bin/java -jar %%DATADIR%%/foo.jar "$@"</programlisting>
+
+	<para>The <function>exec</function> statement replaces the shell
+	  process with the specified program. If <function>exec</function>
+	  is omitted, the shell process remains in memory while the
+	  program is executing, and needlessly consumes system
+	  resources.</para>
+
+      </sect1>
+
       <sect1 id="dads-uid-and-gids">
 	<title>UIDs and GIDs</title>
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->lawrance 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Mon Feb 13 07:32:19 UTC 2006 
Responsible-Changed-Why:  
Take 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92342 
Responsible-Changed-From-To: lawrance->freebsd-doc 
Responsible-Changed-By: lawrance 
Responsible-Changed-When: Mon Feb 13 07:43:49 UTC 2006 
Responsible-Changed-Why:  
Sorry, some nut put the '2' key right next to the '3' key. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92342 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Thu Feb 23 13:42:53 UTC 2006 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92342 
>Unformatted:
