[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] [hurd] pflocal/socket.c: Support MSG_DONTWAIT in pflocal sen

From: Christian Seiler
Subject: Re: [PATCH] [hurd] pflocal/socket.c: Support MSG_DONTWAIT in pflocal send/recv
Date: Mon, 8 Aug 2016 12:32:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

On 08/08/2016 12:18 PM, Justus Winter wrote:
>> [settrans -ck stuff]
> All in all this was just bad advice.

Ok, good to know. :)

>>> Use the remap translator instead, which is one of the things the Hurd
>>> design allows you to do easily.
>>> See /bin/remap to easily set one.
>> remap doesn't work at all here, programs then complain
>> that they can't assign requested address when doing any
>> socket operation.
> Seems to work fine here:
> teythoon@hurdbox ~ % cd /tmp
> teythoon@hurdbox /tmp % settrans -ac 1 /hurd/pflocal
> teythoon@hurdbox /tmp % remap /servers/socket/1 /tmp/1 -- /bin/bash -c 'echo 
> huhu world | wc'
>       1       2      11

For pipes yes, for named sockets (which is what open-isns
uses): no.

$ cd /tmp
$ settrans -ac 1 /hurd/pflocal
$ remap /servers/socket/1 /tmp/1 -- python3
Python 3.5.2+ (default, Aug  5 2016, 08:07:14) 
[GCC 6.1.1 20160705] on gnu0
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> s.bind('/tmp/test.sock')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 1073741873] Cannot assign requested address

(Same also from C programs, Python is just easier to test.)

The same python code works if you run it without remap.

Anyway, not terribly important to me, rebooting did work fine
anyway, and I now have a working patch for open-isns that will
make it work on Hurd once my other patch against pflocal's
socket.c is merged.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]