libuv/src/unix
Ben Noordhuis 1b0ac59179 sunos: preemptively fix uv_exepath(size=1)
I'm not 100% sure whether the behavior of readlink() with size=0 is
well-defined on Solaris; it can return either 0 or fail with EINVAL.
POSIX is not explicit about the mandated behavior.

This commit adds a little caution and makes it skip the readlink()
call when size=1 and simply writes the terminating zero byte.

PR-URL: https://github.com/libuv/libuv/pull/104
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-01-03 23:40:34 +01:00
..
aix.c unix: make uv_exepath(size=0) return UV_EINVAL 2015-01-03 23:39:55 +01:00
android-ifaddrs.c android: add support of ifaddrs in android 2014-03-16 23:16:25 +01:00
async.c unix: fix uv__open_cloexec usage 2014-05-12 11:23:13 +02:00
atomic-ops.h unix: add atomic-ops.h 2013-10-20 13:58:34 +02:00
core.c unix, windows: fix UV_RUN_ONCE mode if progress was made 2014-12-23 09:49:12 +01:00
darwin-proctitle.c unix: fix warnings when loading functions with dlsym 2014-09-17 22:47:01 +02:00
darwin.c darwin: fix uv_exepath(smallbuf) UV_EPERM error 2015-01-03 23:40:24 +01:00
dl.c unix, windows: uv_dlerror const argument 2014-05-13 00:00:54 +02:00
freebsd.c unix: make uv_exepath(size=0) return UV_EINVAL 2015-01-03 23:39:55 +01:00
fs.c linux: fix support for preadv/pwritev-less kernels 2015-01-02 18:02:34 +01:00
fsevents.c unix: fix warnings when loading functions with dlsym 2014-09-17 22:47:01 +02:00
getaddrinfo.c cleanup: remove a dead increment 2014-12-09 12:53:04 +01:00
getnameinfo.c unix: allow uv_getnameinfo to be cancelled 2014-06-18 02:00:07 +02:00
internal.h common: move STATIC_ASSERT to uv-common.h 2015-01-02 16:17:10 +01:00
kqueue.c Merge branch 'v0.10' into v1.x 2014-12-05 19:18:36 +01:00
linux-core.c linux: fix uv_exepath(size=1) UV_EINVAL error 2015-01-03 23:40:31 +01:00
linux-inotify.c unix, windows: avoid error in uv_fs_event_stop 2014-05-13 10:05:39 +02:00
linux-syscalls.c linux: fix epoll_pwait() sigmask size calculation 2014-12-25 14:37:02 +01:00
linux-syscalls.h linux: fix epoll_pwait() sigmask size calculation 2014-12-25 14:37:02 +01:00
loop-watcher.c unix, windows: removed unused status parameter 2014-03-17 21:42:36 +01:00
loop.c Merge branch 'v0.10' into v1.x 2014-12-05 19:18:36 +01:00
netbsd.c unix: make uv_exepath(size=0) return UV_EINVAL 2015-01-03 23:39:55 +01:00
openbsd.c openbsd: fix uv_exepath(smallbuf) UV_EINVAL error 2015-01-03 23:40:29 +01:00
pipe.c cleanup: remove all dead assignments 2014-12-09 12:52:51 +01:00
poll.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
process.c unix: fix processing process handles queue 2014-11-26 11:07:24 +01:00
proctitle.c unix: clean up __attribute__((quux)) usage 2013-08-12 07:41:49 +02:00
pthread-fixes.c unix: workaround broken pthread_sigmask on Android 2014-03-06 11:54:50 +01:00
signal.c unix: fix various memory leaks and undef behavior 2013-12-07 02:29:43 +04:00
spinlock.h unix: add spinlock.h 2013-10-20 13:58:34 +02:00
stream.c cleanup: remove all dead assignments 2014-12-09 12:52:51 +01:00
sunos.c sunos: preemptively fix uv_exepath(size=1) 2015-01-03 23:40:34 +01:00
tcp.c Revert "unix: only set SO_REUSEADDR when bind() fails" 2014-12-29 17:15:20 +01:00
thread.c win: fix uv_thread_self() 2014-11-10 20:03:01 -03:00
timer.c unix, windows: don't allow a NULL callback on timers 2014-09-05 16:59:18 +02:00
tty.c tty: implement binary I/O terminal mode 2014-12-27 18:18:24 +01:00
udp.c unix: fix ttl, multicast ttl and loop options on IPv6 2015-01-02 17:34:13 +01:00
uv-dtrace.d unix: dtrace probes for tick-start and tick-stop 2013-04-10 14:10:05 +02:00