View | Details | Raw Unified | Return to bug 92342
Collapse All | Expand All

(-)book.sgml (+20 lines)
Lines 9227-9232 Link Here
9227
	  for their files.</para>
9227
	  for their files.</para>
9228
      </sect1>
9228
      </sect1>
9229
9229
9230
      <sect1 id="dads-sh-exec">
9231
	<title>Use the <function>exec</function> statement in wrapper scripts</title>
9232
9233
	<para>If the port installs a shell script whose purpose is to launch
9234
	  another program, and if launching that program is the last action
9235
	  performed by the script, make sure to modify the script so that
9236
	  it launches the program using the <function>exec</function>
9237
	  statement, for instance:</para>
9238
9239
	<programlisting>#!/bin/sh
9240
exec %%LOCALBASE%%/bin/java -jar %%DATADIR%%/foo.jar "$@"</programlisting>
9241
9242
	<para>The <function>exec</function> statement replaces the shell
9243
	  process with the specified program. If <function>exec</function>
9244
	  is omitted, the shell process remains in memory while the
9245
	  program is executing, and needlessly consumes system
9246
	  resources.</para>
9247
9248
      </sect1>
9249
9230
      <sect1 id="dads-uid-and-gids">
9250
      <sect1 id="dads-uid-and-gids">
9231
	<title>UIDs and GIDs</title>
9251
	<title>UIDs and GIDs</title>

Return to bug 92342