From dpelleg@cs.cmu.edu  Wed Nov 12 16:52:51 2003
Return-Path: <dpelleg@cs.cmu.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6472A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Nov 2003 16:52:51 -0800 (PST)
Received: from gw.pelleg.org (gw.pelleg.org [205.201.13.235])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5F4BF43FA3
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Nov 2003 16:52:50 -0800 (PST)
	(envelope-from dpelleg@cs.cmu.edu)
Received: from lank.here (lank.wburn [192.168.3.41])
	(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
	(Client CN "gw.pelleg.org", Issuer "Dan Pelleg" (verified OK))
	by gw.pelleg.org (Postfix) with ESMTP id 312805A4E
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Nov 2003 19:52:48 -0500 (EST)
Received: by lank.here (Postfix, from userid 7675)
	id 0951F75E; Wed, 12 Nov 2003 19:52:44 -0500 (EST)
Message-Id: <20031113005244.0951F75E@lank.here>
Date: Wed, 12 Nov 2003 19:52:44 -0500 (EST)
From: Dan Pelleg <daniel+handbook@pelleg.org>
Reply-To: Dan Pelleg <daniel+handbook@pelleg.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: handbook update: linux MATLAB
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         59240
>Category:       docs
>Synopsis:       [patch] [handbook] update: linux MATLAB
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 12 17:00:36 PST 2003
>Closed-Date:    Tue Oct 15 12:57:12 UTC 2013
>Last-Modified:  Tue Oct 15 12:57:12 UTC 2013
>Originator:     Dan Pelleg
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:

	
>Description:
Exit script to solve a problem of unquittable MATLAB. Contributed
by Richard Winkel.
	
>How-To-Repeat:
	
>Fix:


--- en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml.orig	Wed Nov 12 18:11:54 2003
+++ en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml	Wed Nov 12 19:30:21 2003
@@ -859,21 +859,52 @@
       </tip>
     </sect2>
 
+    <sect2>
+      <title>Creating a &matlab; Shutdown Script</title>
+
+      <para> The following is needed to solve a problem with &matlab
+        not exiting correctly.</para>
+
+      <procedure>
+	<step>
+	  <para>Create a file
+            <filename>$MATLAB/toolbox/local/finish.m</filename>, and 
+            in it put the single line:</para>
+
+	  <programlisting>! $MATLAB/bin/finish.sh</programlisting>
+
+          <note><para>The $MATLAB is literal.</para></note>
+
+          <tip><para>In the same directory, you will find the files
+              <filename>finishsav.m</filename> and
+              <filename>finishdlg.m</filename>, which let you save
+              your workspace before quitting. If you use either of
+              them, insert the line above immediately after the "save"
+              command.</para></tip>
+    </step>
+    <step>
+	  <para>Create a file
+            <filename>$MATLAB/bin/finish.sh</filename>, which will
+            contain the following:</para>
+
+	  <programlisting>#!/usr/compat/linux/bin/sh
+(sleep 5; killall -1 matlab_helper) &
+exit 0</programlisting>
+    </step>
+    <step>
+	    <para>Make the file executable:</para>
+
+	    <screen>&prompt.root; <userinput>chmod +x $MATLAB/bin/finish.sh</userinput></screen>
+
+    </step>
+      </procedure>
+    </sect2>
+
     <sect2 id="matlab-using">
       <title>Using &matlab;</title>
 
       <para>At this point you are ready to type
-	<command>matlab</command> and start using it.  Note that the
-	version of <application>&java;</application> shipped with
-	<application>&matlab;</application> does not work well under
-	&os;.  It will make it hard to quit
-	<application>&matlab;</application> and you will have to
-	<command>kill -9</command> it.  If you do not  use
-	<application>&java;</application> at all, you can avoid this
-	nuisance by starting
-	<application>&matlab;</application> with the
-	<option>-nojvm</option>
-	switch.</para>
+	<command>matlab</command> and start using it.</para>
     </sect2>
   </sect1>
 

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->blackend 
Responsible-Changed-By: blackend 
Responsible-Changed-When: Thu Nov 13 00:22:07 PST 2003 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59240 
State-Changed-From-To: open->closed 
State-Changed-By: blackend 
State-Changed-When: Thu Nov 13 12:53:36 PST 2003 
State-Changed-Why:  
I committed a slightly different version of your patch (just layout 
changes).  Thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59240 

From: Marius Strobl <marius@alchemy.franken.de>
To: blackend@FreeBSD.org
Cc: freebsd-gnats-submit@FreeBSD.org, daniel+handbook@pelleg.org
Subject: Re: docs/59240: handbook update: linux MATLAB
Date: Sun, 25 Apr 2004 15:10:55 +0200

 Hello Marc,
 
 Don Lewis fixed the problem that required the Matlab shutdown script
 workaround in src/sys/kern/kern_exit.c rev. 1.222 (Feb 19 2004),
 MFCed to RELENG_4 in rev. 1.92.2.13 (Mar 3 2004). Could you please
 update the section "Creating a MATLAB Shutdown Script" in
 doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml to reflect
 that it's no longer required on FreeBSD containing that fix?
 
State-Changed-From-To: closed->open 
State-Changed-By: marius 
State-Changed-When: Sun Apr 25 06:22:18 PDT 2004 
State-Changed-Why:  

Section needs updating again. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59240 

From: Marc Fonvieille <blackend@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: Marius Strobl <marius@alchemy.franken.de>
Subject: Re: docs/59240: [patch] handbook update: linux MATLAB
Date: Tue, 10 Aug 2010 11:03:34 +0200

 Hello Marius,
 
 Can I simply remove the "Creating a MATLAB Shutdown Script" section?
 BTW could you check if MATLAB run on 8.X?
 
 -- 
 Marc

From: Marius Strobl <marius@alchemy.franken.de>
To: Marc Fonvieille <blackend@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: docs/59240: [patch] handbook update: linux MATLAB
Date: Mon, 23 Aug 2010 20:48:33 +0200

 On Tue, Aug 10, 2010 at 11:03:34AM +0200, Marc Fonvieille wrote:
 > Hello Marius,
 
 Hi Marc,
 
 sorry for the late reply.
 
 > 
 > Can I simply remove the "Creating a MATLAB Shutdown Script" section?
 
 I think so.
 
 > BTW could you check if MATLAB run on 8.X?
 > 
 
 I still should have the MATLAB version I used back then somewhere.
 However, I don't think it makes much sense to test how it behaves
 nowadays and I unfortunately don't have access to a current version
 of MATLAB.
 The following posting suggests ("limiting to 10.5.1 and 10.5.2
 paragraphs") that the shutdown script indeed no longer is necessary
 with a recent version:
 http://forums.freebsd.org/showthread.php?t=10076
 Unfortunately it also means that the handbook section about MATLAB
 is quite outdated ...
 
 Marius
 
Responsible-Changed-From-To: blackend->dru 
Responsible-Changed-By: dru 
Responsible-Changed-When: Tue Oct 15 12:54:59 UTC 2013 
Responsible-Changed-Why:  
As per discussion with blackend, I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59240 
State-Changed-From-To: open->closed 
State-Changed-By: dru 
State-Changed-When: Tue Oct 15 12:55:35 UTC 2013 
State-Changed-Why:  
This section commented out of Handbook for now as the Linux version is currently only available in 64-bit. 

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