From owner-freebsd-stable Tue May 14 9:16:27 2002 Delivered-To: freebsd-stable@freebsd.org Received: from martens.math.ntnu.no (martens.math.ntnu.no [129.241.15.250]) by hub.freebsd.org (Postfix) with SMTP id 03CA137B403 for ; Tue, 14 May 2002 09:16:22 -0700 (PDT) Received: (qmail 18626 invoked by uid 29119); 14 May 2002 16:16:20 -0000 Date: Tue, 14 May 2002 18:16:20 +0200 (MET DST) From: Per Kristian Hove X-X-Sender: perhov@martens.math.ntnu.no Reply-To: freebsd-stable@freebsd.org To: niek@bergboer.net Cc: freebsd-stable@freebsd.org Subject: Re: matlab6 & /dev/ptmx In-Reply-To: <20020514142128.O57972@wit379119.student.utwente.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [Niek Bergboer] | On Tue, May 14, 2002 at 02:59:04PM +0300, Danny Braniss wrote: | > ??? MATLAB was unable to open the pseudo-tty master device /dev/ptmx | > [...] | > is there any solution to this? (apart from running it native under linux :-)? .. | In -STABLE a /dev/ptmx workalike doesn't exist, and I haven't been | able to get MATLAB to work properly. Basically, this means that most | MATLAB functionality is present, but the calling of external commands | (e.g. !ls) doesn't work. You can LD_PRELOAD a library that replaces open() and catches the open("/dev/ptmx") special case, then does a BSD opentty() and returns the file descriptor of the tty. (Of course you'll have to compile this library on Linux for the LD_PRELOADing to work, and modify the Matlab startup script to set LD_PRELOAD right before it exec's the binary. That makes it a bit more of a hassle). A colleague of mine has written a small library to do this. For a short period of time, you can find it at this address: http://www.math.ntnu.no/~perhov/public/tmp/fake_ptmx/ Btw: Matlab 6.1 seems to work better than 6.0 in this respect, as no LD_PRELOADing is necessary. -- Per Kristian Hove Principal engineer Dept. of Mathematical Sciences Norwegian University of Science and Technology To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message