[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: Justus Winter
Subject: Re: [PATCH] [hurd] pflocal/socket.c: Support MSG_DONTWAIT in pflocal send/recv
Date: Mon, 08 Aug 2016 12:55:24 +0200
User-agent: Notmuch/0.22+51~gcc1a6d2 (https://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu)

Christian Seiler <christian@iwakd.de> writes:

>>>> 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.

Right, I can see how this is a problem.  The thing is, remap doesn't
quite do the job: 1/ it fails to remap relative paths, 2/ if one sets a
translator record on a node, and that translator is then started by the
filesystem, it is started "outside" of the remap environment.  I belive
2/ is what happens here.

fakeroot has the same problem.  For me, lack of robust lightweight
virtualization this is the most pressing shortcoming of the Hurd, and I
did some work to address this.  Aiui remap/fakeroot must prevent the
filesystem from starting the translator and do it themself to make the
translation more correct.

> 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.



Attachment: signature.asc
Description: PGP signature

reply via email to

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