Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2001 07:58:19 -0600
From:      John E Hein <jhein@timing.com>
To:        rdmurphy@vt.edu
Cc:        freebsd-emulation@FreeBSD.ORG, Shiro Ikeda <shiro@brain.riken.go.jp>
Subject:   Re: can't quit matlab 12.1 under linux_base6.1
Message-ID:  <15218.38651.258849.4333@brain.timing.com>
In-Reply-To: <15218.35514.511382.285461@localhost.econ.vt.edu>
References:  <20001208.201621.55429972.shiro@brain.riken.go.jp> <15217.48827.763275.306777@brain.timing.com> <15218.35514.511382.285461@localhost.econ.vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Russell D. Murphy Jr. wrote at 09:06 -0400 on Aug  9:
 > 
 > Matlab runs, complains about /dev/ptmx, does *not* (as far as I can
 > tell) generate the ioctl complaints, and *does* quit fine.
 > 
 >    knock [rdmurphy]% uname -a
 >    FreeBSD knock.econ.vt.edu 4.4-PRERELEASE FreeBSD 4.4-PRERELEASE #0:
 >       Fri Aug  3 19:22:32 EDT 2001     
 >       root@knock.econ.vt.edu:/usr/obj/usr/src/sys/KNOCK  i386
 > 
 >    knock [rdmurphy]% /sbin/sysctl -a | grep linux
 >    compat.linux.osname: Linux
 >    compat.linux.osrelease: 2.2.12
 >    compat.linux.oss_version: 198144
 > 
 >    knock [rdmurphy]% pkg_info | grep linux_base
 >    linux_base-6.1      The base set of packages needed in Linux mode
 > 
 > The device would be nice, but basic Matlab seems to work OK without
 > it. 

Russell,
What version of Matlab are you running?  And when you say, "basic Matlab",
 I assume you mean everything but ! and unix()?

From the archives, it seems like R12 complains about /dev/ptmx, but I
 haven't seen any messages from anyone running R12.1

Note that when I 'ln -s /dev/null /dev/ptmx', I DO get the complaint
 about /dev/ptmx and not the 'ioctl not implemented' messages.
 And in this case (with the bogus /dev/ptmx), I cannot use matlab
 unix() or ! commands.  And, yes, it *does* quit fine.

When I truss matlab R12.1 WITHOUT the faked /dev/ptmx sym link, it tries
 to open /dev/ptmx, fails, and then tries opening /dev/ptyp0 then 1 then...

linux_open("/dev/ptmx",2,027757751270)           ERR#2 'No such file or directory'
linux_rt_sigaction(0x11,0xbfbfb500,0xbfbfb474,0x8) = 4 (0x4)
linux_rt_sigprocmask(0x1,0xbfbfb690,0x0,0x8)     = 4 (0x4)
linux_open("/dev/ptyp0",2,0160)                  ERR#5 'Input/output error'
linux_open("/dev/ptyp1",2,0160)                  ERR#5 'Input/output error'
linux_open("/dev/ptyp2",2,0160)                  = 3 (0x3)
linux_open("/dev/ttyp2",2,0160)                  = 3 (0x3)

Perhaps Mathworks tried to implement some workaround in R12.1 for an OS
 that doesn't have Unix98 ptys?

Anyway, I get no complaint about /dev/ptmx (this is still the scenario
 without the faked /dev/ptmx sym link) and unix() and ! commands from
 within matlab work fine.  However, when I quit it hangs and leaves 3
 matlab processes around (1 is a zombie) that I have to kill from another
 shell (can't even Ctrl-Z to suspend the matlab).

So there's a tradeoff:
 - make a bogus /dev/ptmx sym linked to /dev/null and lose unix() and
      ! functionality in matlab (and matlab whines about /dev/ptmx)
 - or run matlab R12.1 without the fake /dev/ptmx sym link, and you can't
      quit (and the linux emulator whines about unimplemented ioctls)


To get a completely functioning matlab, it looks like we need to at
 least identify and fake, if not implement, the unimplemented ioctls.

Has anyone heard talk of implementing unix98 ptys in FreeBSD or faking
 it somehow for linux emulation?  There seems to be some discussion of
 doing it recently on the tech-kern NetBSD mailing list, but I don't see
 anything in archives of FreeBSD mailing lists.

John Hein

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




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