Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2002 18:16:20 +0200 (MET DST)
From:      Per Kristian Hove <perhov+/dev/null@math.ntnu.no>
To:        niek@bergboer.net
Cc:        freebsd-stable@freebsd.org
Subject:   Re: matlab6  & /dev/ptmx
Message-ID:  <Pine.GSO.4.40.0205141804230.17040-100000@martens.math.ntnu.no>
In-Reply-To: <20020514142128.O57972@wit379119.student.utwente.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
[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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.40.0205141804230.17040-100000>