[comp.os.minix] User mode send/receive

HERRHOYMAN%20484%UWECVAXA.BITNET@cunyvm.cuny.edu (Dirk Herr-Hoyman) (09/26/89)

I have been trying to set up a server process in user mode
using the send/receive system calls, but with no success.

The server sits in an infinite loop trying to receive(ANY, &mess).
This returns a -8 (and a 0 for the mess.m_source).  When the client
sends to the server, this returns a -2.

I am not sure what these error codes mean.  I am guessing that
they belong to the group of status messages generated by
the kernel (lines 296-307).  In which case -8 is E_NO_PERM
and -2 is E_BAD_SRC.

Since there is no corresponding send/receive system calls in Unix,
I have no manual to look (perhaps manual entries for these could
be included in the next edition of the BOOK).

I am guessing at this point that send/receive may not work in user mode
the way I would like.  Perhaps a user mode process cannot do a
receive(ANY,...).

Any help in this matter would be greatly appreciated.

Dirk Herr-Hoyman
UW-Eau Claire, CS Dept.
BITNET: HERRHOYM@UWECVAXC

HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (09/26/89)

Hi,
In MINIX, user processes are only allowed to do SENDREC (send & receive),
not SEND or RECEIVE alone. Only Tasks (device drivers) and Server Processes
(this means either the File System or the Memory Manager) can do SEND
or RECEIVE alone.

Christoph van Wuellen, Bochum.

ast@cs.vu.nl (Andy Tanenbaum) (09/27/89)

In article <24883@louie.udel.EDU> HERRHOYMAN%20484%UWECVAXA.BITNET@cunyvm.cuny.edu (Dirk Herr-Hoyman) writes:
>I have been trying to set up a server process in user mode
>using the send/receive system calls, but with no success.

Take a look at lines 1986-1988 in the book.  If you remove these, it will
work.

Andy Tanenbaum (ast@cs.vu.nl)