unix domain sockets in linux emulation
avg at icyb.net.ua
Fri Oct 15 06:58:38 PDT 2004
It seems that pathname "prefixing" is not performed for unix domain
socket calls in linux emulation e.g. "/compat/linux" prefix is never
tried to be prepended for bind() and connect() calls.
This leads to linux applications failing in scenarios like this:
//this will create /compat/linux/tmp/foo/ directory
s = socket(AF_LOCAL, SOCK_DGRAM, PF_LOCAL);
addr.sun_family = AF_LOCAL;
bind(s, (struct sockaddr *) &addr, SUN_LEN(&addr));
//this will try to bind socket in /tmp/foo/ directory
//which does not exist
Existence of this problem can be easily verified using the above code.
I have experinced this problem on FreeBSD 5.2.1 with two real-life
IBM WebSphere MQ 5.3
Should this be considered as a bug or a feature ?
More information about the freebsd-emulation