|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Solved: Unix socket connection failed |
Date: | Thu, 24 Jul 2014 13:26:19 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi Elias,
the idea is this: man 7 unix says: abstract: an abstract socket address is distinguished by the fact that sun_path[0] is a null byte ('\0'). The socket's address in this namespace is given by the additional bytes in sun_path that are covered by the specified length of the address structure. (Null bytes in the name have no special significance.) So I memset() the entire socket address first and then copy the name to sun_path, but starting at sun_path[1] so that sun_path[0] remains 0 (making it an abstract socket). man 7 unix also says: The abstract socket namespace is a nonportable Linux extension. That's why I #define ABSTRACT_OFFSET to 1 if your OS supports it and you can change it to 0 if not. In the latter case you have to provide a file /tmp/GNU-APL/APserver manually with proper permissions. This file is having the file permissions that you were after earlier. I am not creating that file because I expect more problems with it than benefits (who owns it, who installs it, what if one user creates it with wrong permissions etc.). My general feeling is that TCP on localhost is much cleaner and maybe I should make that the default. /// Jürgen On 07/24/2014 12:59 PM, Elias Mårtenson wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |