<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/network, branch v0.9.8</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>improve SOCK_NONBLOCK/SOCK_CLOEXEC fallback code</title>
<updated>2012-11-05T19:30:15+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-11-05T19:30:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e8a0b27a7101f5b9939de83df3d6d8b606c5678b'/>
<id>e8a0b27a7101f5b9939de83df3d6d8b606c5678b</id>
<content type='text'>
checking for EINVAL should be sufficient, but qemu user emulation
returns EPROTONOSUPPORT in some of the failure cases, and it seems
conceivable that other kernels doing linux-emulation could make the
same mistake. since DNS lookups and other important code might break
if the fallback does not get invoked, be extra careful and check for
either error.

note that it's important NOT to perform the fallback code on other
errors such as resource-exhaustion cases, since the fallback is not
atomic and will lead to file-descriptor leaks in multi-threaded
programs that use exec. the fallback code is only "safe" to run when
the initial failure is caused by the application's choice of
arguments, not the system state.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
checking for EINVAL should be sufficient, but qemu user emulation
returns EPROTONOSUPPORT in some of the failure cases, and it seems
conceivable that other kernels doing linux-emulation could make the
same mistake. since DNS lookups and other important code might break
if the fallback does not get invoked, be extra careful and check for
either error.

note that it's important NOT to perform the fallback code on other
errors such as resource-exhaustion cases, since the fallback is not
atomic and will lead to file-descriptor leaks in multi-threaded
programs that use exec. the fallback code is only "safe" to run when
the initial failure is caused by the application's choice of
arguments, not the system state.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix some more O_CLOEXEC/SOCK_CLOEXEC issues</title>
<updated>2012-09-29T21:59:50+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-29T21:59:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f2d08cf7558176af7ef36cf5b5213e676b02d7ac'/>
<id>f2d08cf7558176af7ef36cf5b5213e676b02d7ac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>move accept4, dup3, and pipe2 to non-linux-specific locations</title>
<updated>2012-09-29T21:40:42+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-29T21:40:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=dc62790deec183697489d5fddea03c82f725e7fd'/>
<id>dc62790deec183697489d5fddea03c82f725e7fd</id>
<content type='text'>
these interfaces have been adopted by the Austin Group for inclusion
in the next version of POSIX.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
these interfaces have been adopted by the Austin Group for inclusion
in the next version of POSIX.
</pre>
</div>
</content>
</entry>
<entry>
<title>emulate SOCK_CLOEXEC and SOCK_NONBLOCK for old (pre-2.6.27) kernels</title>
<updated>2012-09-29T21:36:27+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-29T21:36:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=79a5e73e518213d5e77a06cfc0db74ffbf7922c6'/>
<id>79a5e73e518213d5e77a06cfc0db74ffbf7922c6</id>
<content type='text'>
also update syslog to use SOCK_CLOEXEC rather than separate fcntl
step, to make it safe in multithreaded programs that run external
programs.

emulation is not atomic; it could be made atomic by holding a lock on
forking during the operation, but this seems like overkill. my goal is
not to achieve perfect behavior on old kernels (which have plenty of
other imperfect behavior already) but to avoid catastrophic breakage
in (1) syslog, which would give no output on old kernels with the
change to use SOCK_CLOEXEC, and (2) programs built on a new kernel
where configure scripts detected a working SOCK_CLOEXEC, which later
get run on older kernels (they may otherwise fail to work completely).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
also update syslog to use SOCK_CLOEXEC rather than separate fcntl
step, to make it safe in multithreaded programs that run external
programs.

emulation is not atomic; it could be made atomic by holding a lock on
forking during the operation, but this seems like overkill. my goal is
not to achieve perfect behavior on old kernels (which have plenty of
other imperfect behavior already) but to avoid catastrophic breakage
in (1) syslog, which would give no output on old kernels with the
change to use SOCK_CLOEXEC, and (2) programs built on a new kernel
where configure scripts detected a working SOCK_CLOEXEC, which later
get run on older kernels (they may otherwise fail to work completely).
</pre>
</div>
</content>
</entry>
<entry>
<title>fix getaddrinfo to accept port 0 (zero)</title>
<updated>2012-09-22T20:19:06+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-22T20:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=4b49060da09b37e36ae08b49499c4a53b4f53890'/>
<id>4b49060da09b37e36ae08b49499c4a53b4f53890</id>
<content type='text'>
new behavior can be summarized as:
inputs that parse completely as a decimal number are treated as one,
and rejected only if the result is out of 16-bit range.
inputs that do not parse as a decimal number (where strtoul leaves
anything left over in the input) are searched in /etc/services.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
new behavior can be summarized as:
inputs that parse completely as a decimal number are treated as one,
and rejected only if the result is out of 16-bit range.
inputs that do not parse as a decimal number (where strtoul leaves
anything left over in the input) are searched in /etc/services.
</pre>
</div>
</content>
</entry>
<entry>
<title>use restrict everywhere it's required by c99 and/or posix 2008</title>
<updated>2012-09-07T02:44:55+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-09-07T02:44:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=400c5e5c8307a2ebe44ef1f203f5a15669f20347'/>
<id>400c5e5c8307a2ebe44ef1f203f5a15669f20347</id>
<content type='text'>
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to deal with the fact that the public headers may be used with pre-c99
compilers, __restrict is used in place of restrict, and defined
appropriately for any supported compiler. we also avoid the form
[restrict] since older versions of gcc rejected it due to a bug in the
original c99 standard, and instead use the form *restrict.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove scanf dependency from getaddrinfo /etc/services support</title>
<updated>2012-07-23T02:09:45+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-23T02:09:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=845a5e69fa33bf49eea81a7b8c80902ab1687f2e'/>
<id>845a5e69fa33bf49eea81a7b8c80902ab1687f2e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>getaddrinfo /etc/services lookup support</title>
<updated>2012-07-22T23:42:44+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-22T23:42:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=efe72c561925a711d8dbc7894ef27fe823205e21'/>
<id>efe72c561925a711d8dbc7894ef27fe823205e21</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>make getservby*_r return error code rather than -1 (and using errno)</title>
<updated>2012-07-22T22:49:49+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-22T22:49:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=75fff40b9b536e0e6847d17ecc076894ca7b7068'/>
<id>75fff40b9b536e0e6847d17ecc076894ca7b7068</id>
<content type='text'>
untested but should be correct..
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
untested but should be correct..
</pre>
</div>
</content>
</entry>
<entry>
<title>fix logic error for skipping failed interfaces in if_nameindex</title>
<updated>2012-07-21T21:56:48+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-07-21T21:56:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=68c58223672465202958a5da16f19f64f32acf74'/>
<id>68c58223672465202958a5da16f19f64f32acf74</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
