Re: compat_linux: Add socket type mask.

2012-06-22 Thread Philip Guenther
On Fri, Jun 22, 2012 at 2:41 AM, Paul Irofti wrote: > Tested with the following program and everything seems to work. I've > also sprinkled some extra printfs in the original diff and both cases > are found and dealt with in the kernel. Woot. In it goes!

Re: compat_linux: Add socket type mask.

2012-06-22 Thread Paul Irofti
On Wed, Jun 20, 2012 at 11:18:39PM -0700, Philip Guenther wrote: > On Wed, Jun 20, 2012 at 4:26 AM, Paul Irofti wrote: > > +               SCARG(&bfa, cmd) = F_SETFL; > > +               SCARG(&bfa, arg) = (void *)O_NONBLOCK; > > +               error = sys_fcntl(p, &bfa, retval); > > That assu

Re: compat_linux: Add socket type mask.

2012-06-20 Thread Philip Guenther
On Wed, Jun 20, 2012 at 4:26 AM, Paul Irofti wrote: > +               SCARG(&bfa, cmd) = F_SETFL; > +               SCARG(&bfa, arg) = (void *)O_NONBLOCK; > +               error = sys_fcntl(p, &bfa, retval); That assumes that a new socket can't have any of the FCNTLFLAGS set on it, which _is_

Re: compat_linux: Add socket type mask.

2012-06-20 Thread Paul Irofti
On Tue, Jun 19, 2012 at 02:02:03PM -0700, Philip Guenther wrote: > On Tue, Jun 19, 2012 at 1:26 AM, Paul Irofti wrote: > > The newer glibc's, when creating a socket, add some higher bit flags to > > the type argument that are used for debug, statistics, profiling > > whatever. They are not useful

Re: compat_linux: Add socket type mask.

2012-06-19 Thread Philip Guenther
On Tue, Jun 19, 2012 at 1:26 AM, Paul Irofti wrote: > The newer glibc's, when creating a socket, add some higher bit flags to > the type argument that are used for debug, statistics, profiling > whatever. They are not useful and implementation specific. Aren't those SOCK_CLOEXEC and SOCK_NONBLOCK

compat_linux: Add socket type mask.

2012-06-19 Thread Paul Irofti
The newer glibc's, when creating a socket, add some higher bit flags to the type argument that are used for debug, statistics, profiling whatever. They are not useful and implementation specific. This is needed for DNS resolving, otherwise the nss library from glibc will always fail to do the righ