[MLton] Port of OpenBSD to MLton

Jesper Louis Andersen jlouis@mongers.org
Sun, 13 Jun 2004 12:39:39 +0200


Quoting Stephen Weeks (sweeks@sweeks.com):

> > ; The socket.sml regression fails, but this is due to 
> >   OpenBSD handling it that way rather than an error in
> >   MLton. A little test I made with my webserver pulled
> >   data from it without problems.
> 
> It seems that the problem with the test is that the parent process
> connects to the socket before the child has accepted -- and unlike all
> our other platforms, OpenBSD chooses to implement this as failure
> rather than completing the connect and waiting for the other end to
> accept.  Jesper, do you agree that that is the problem?  Any ideas on
> how to fix it?  I'm willing to change the regression test.

I am not sure about this yet. I will make some more research into it
and come forth with a proper answer when I have one.

> I built the package by cross compiling from a Linux machine, since I
> can't bootstrap on OpenBSD because I can't get OpenBSD to let me have
> more than 256M memory for my processes.  I've tried using ulimit -d,
> but to no avail.  Jesper, any ideas?  My machine has 1G RAM and when I
> login as root, OpenBSD gives it to me.  But it won't let me have it
> with a normal user account.  Once I've fixed that problem, I'll build
> again, this time by bootstrapping on the OpenBSD machine.

Yes, you are in the wrong login class, so you cannot raise the
limit above 256M. Use the command vipw(8) to change your login class
from ''default'' to ''staff''. Login classes are defined in
/etc/login.conf with man-page login.conf(5). ''Staff'' is allowed
infinite resources with respect to data. This allows me to make a
500m fixed-heap and run it with that. With ram-slop it seems to have
a bit of problems, but I am going to find and patch that (OpenBSD likes
to avoid /proc, so I'd rather not use that if I can get away with it)

-- 
j.