Commit Graph

1958 Commits

Author SHA1 Message Date
Shane Holloway
5d92ccce94 windows: add flag for hiding windows created by a spawned process
Closes GH-627
2012-11-27 16:48:46 +01:00
Ben Noordhuis
99d3102b90 unix: drop pthread dependency in threadpool.c
Replace the pthread code with their libuv counterparts. One step closer to a
shared thread pool implementation.
2012-11-26 02:08:54 +01:00
Shigeki Ohtsu
0cca5391ba unix, windows: disallow NULL worker in thread pool
See #629.
2012-11-24 01:09:49 +01:00
Ben Noordhuis
90271e1a3c darwin, freebsd: set SO_NOSIGPIPE on sockets
Suppresses delivery of SIGPIPE signals when the remote end of the socket has
gone away.
2012-11-22 17:51:56 +01:00
Ben Noordhuis
dcd3b55c19 unix: fix thread pool race condition
Send the wakeup signal to the main thread *before* releasing the lock. Doing it
the other way around introduces a race condition where the watcher may already
have been pulled off the work queue.
2012-11-22 15:01:17 +01:00
Ben Noordhuis
fc5984fb45 build: fix dragonflybsd gyp build
Depends on a not-yet-landed gyp patch: https://codereview.chromium.org/11348152/
2012-11-20 16:48:58 +01:00
Ben Noordhuis
d8a8379751 test: disable fs event test on dragonflybsd
Disable the fs_event_close_in_callback test on DragonFlyBSD, like we do on the
other BSDs.

The test doesn't work with kqueue-based file notifications, the event is
generated before the file is watched. Maybe we should remove it altogether.
2012-11-20 00:46:12 +01:00
Ben Noordhuis
e997dd5981 dragonflybsd: fix uv_fs_futime() 2012-11-20 00:38:24 +01:00
Ben Noordhuis
5aa6298099 dragonflybsd: make uv_cpu_info() less broken 2012-11-20 00:27:00 +01:00
Ben Noordhuis
172d495bb8 build: fix dragonflybsd build, link with libkvm 2012-11-19 23:57:29 +01:00
Ben Noordhuis
3e9344fd34 build: remove unused EV_CONFIG var 2012-11-19 23:53:41 +01:00
Ben Noordhuis
190db15638 unix: set proper loop errno for udp write req cb
Harmonize with stream.c and tcp.c: when a handle is closed that has pending
writes queued up, run the callbacks with loop->err.code set to UV_ECANCELED,
not UV_EINTR.
2012-11-19 04:02:42 +01:00
Ben Noordhuis
665a316aa9 unix: remove libev 2012-11-16 17:33:29 +01:00
Ben Noordhuis
65bb6f068e unix: rename UV__IO_* constants 2012-11-16 17:33:29 +01:00
Ben Noordhuis
1282d64868 unix: remove dependency on libev 2012-11-16 17:33:25 +01:00
Ben Noordhuis
59a2c63931 bench: remove dead and buggy code
Pipe accept benchmarks have never been implemented, remove the code path.

Said code path also contained a bug: it tried to bind to the same pipe that is
bound to a few lines down.
2012-11-16 02:24:23 +01:00
Ben Noordhuis
a28bc88708 bench: print benchmark name in async/async_pummel 2012-11-16 02:24:22 +01:00
Stephen Gallagher
05aac92913 include: export uv_inet_* functions 2012-11-15 21:48:41 +01:00
Ben Noordhuis
c252bcb3f0 bench: fix loop starvation bug
Don't keep writing until the write queue fills up. On fast systems (mine), that
never happens - the data is sent out as fast as the benchmark generates it.
2012-11-15 01:02:07 +01:00
Ben Noordhuis
09b022232a bench: report proper benchmark name 2012-11-13 17:47:47 +01:00
Ben Noordhuis
b9c8d19637 bench: close timer handles before deleting loop
Fixes a segmentation fault / use-after-free.
2012-11-13 15:56:55 +01:00
Ben Noordhuis
3243e9ae67 test: fix (harmless) typo in function name 2012-11-12 18:17:13 +01:00
Ben Noordhuis
625340066e test: fix close of uninitialized handle
The test closes all handles after 1000 ms but the remote peer handle may not
have been initialized by then (very unlikely but not quite impossible).
2012-11-11 03:24:25 +01:00
Ben Noordhuis
0a7e36dcf1 test: add UV_RUN_AS_ROOT check 2012-11-11 03:24:22 +01:00
Ben Noordhuis
62332ea090 build: fix make test on darwin and sunos 2012-11-10 01:43:42 +01:00
Ben Noordhuis
f352e40e00 Merge branch 'v0.8'
Conflicts:
	test/test-spawn.c
	uv.gyp
2012-11-09 20:39:52 +01:00
Ben Noordhuis
deeec421af build: use link_settings, fix typo
* Use link_settings instead of direct_dependent_settings.
* Fix typo: s/ldlags/ldflags/

Pointed out by a certain R.L. Dahl of San Francisco, CA.

Fixes #618.
2012-11-09 20:22:42 +01:00
Ben Noordhuis
bef3ea4818 bench: squelch -Wstrict-aliasing warnings 2012-11-09 03:51:47 +01:00
Ben Noordhuis
d6b7fe0e3b unix: squelch -Wunused-but-set-variable warnings 2012-11-09 03:22:12 +01:00
Ben Noordhuis
20eaa84c4f build: link test runner with -rpath
Link the test runner with -rpath=/path/to/libuv.so, don't muck around with
LD_LIBRARY_PATH.
2012-11-09 02:19:07 +01:00
Ben Noordhuis
2d1f17fecb test: work around valgrind bug 2012-11-09 01:57:58 +01:00
Ben Noordhuis
43d52c77ba test: make make test link against .so 2012-11-08 18:28:57 +01:00
Ben Noordhuis
cc36fd0366 build: support building a .so
This commit adds support to the regular Makefile as opposed to the gyp build.
2012-11-08 18:28:27 +01:00
Ben Noordhuis
d56434a21d build: support building a .so
You can now select to build a shared object at configure time:

  $ ./gyp_uv -Dcomponent=shared_library -Dlibrary=shared_library

And build it with:

  $ make -C out BUILDTYPE=Debug # or BUILDTYPE=Release

Or, if you use ninja:

  $ ninja -C out/Debug
2012-11-07 16:55:53 +01:00
Stephen Gallagher
e318b06a0e include: split off libev function prototypes
This patch creates a new header - ev-proto.h - which contains all of the
protoypes for libev functions. This allows us to create a shared object of
libuv without exposing libev internal functions.
2012-11-07 16:55:49 +01:00
Ben Noordhuis
91faa3e688 test: fix compiler warning
Fix the following warning by not using a static variable:

  test/test-fs-poll.c:79: warning: ‘static’ is not at beginning of declaration
2012-11-07 16:20:18 +01:00
Ben Noordhuis
a7cedbe220 darwin: fix uv_hrtime() thread safety issue 2012-11-07 16:20:18 +01:00
Bert Belder
0097280624 windows: map ERROR_GEN_FAILURE to UV_EIO 2012-11-07 11:11:23 +01:00
Bert Belder
f372fd4b13 windows: map ERROR_GEN_FAILURE to UV_EIO 2012-11-07 11:10:43 +01:00
Ben Noordhuis
a320d46440 test: fix type casting style issue 2012-11-07 05:50:30 +01:00
Ben Noordhuis
2affa60e19 test: remove unnecessary #ifdef _WIN32
This is a back-port of commit 4d17337 from the master branch.
2012-11-06 00:35:39 +01:00
Ben Noordhuis
7759bd63cd test: remove unnecessary #ifdef _WIN32 2012-11-06 00:32:04 +01:00
Bert Belder
4c9e42d0e6 windows: un-break the build
It was broken in fb64948.
2012-11-05 22:13:38 +01:00
Bert Belder
6620e614ac windows: un-break the build
It was broken in 1d85815.
2012-11-05 22:11:22 +01:00
Ben Noordhuis
0ddf9d6b98 Revert "unix: use select() for specific fds on OS X"
This reverts commit 5da380a5ca.

Contains a bug that effectively makes the select() thread busy-loop. The file
descriptor is polled for both reading and writing, regardless of what events
the main thread wants to receive. Fixing that requires proper synchronization
between the two threads.

See #614.
2012-11-04 01:23:12 +01:00
Ben Noordhuis
20bb1bfd70 Revert "unix: reopen tty as /dev/tty"
This reverts commit 31f9fbce63.

The reverted commit depends on commit 5da380a ("use select() for specific fds
on OS X") which polls /dev/tty file descriptors in a separate thread to work
around deficiencies in the kqueue API on OS X.

Unfortunately, 5da380a has a bug that effectively makes the select() thread
busy-loop. Revert this commit for now.
2012-11-04 01:07:14 +01:00
Ben Noordhuis
b5fc9444b1 build: export _LARGEFILE_SOURCE, _FILE_OFFSET_BITS
Export compile-time defines that influence the size of struct stat.

This should avoid sizeof(struct stat) mismatches between libuv and dependent
projects.

On OS X, _DARWIN_USE_64_BIT_INODE=1 is also exported.
2012-11-04 00:58:49 +01:00
Ben Noordhuis
914185d6fc unix: make some internal methods static 2012-11-03 02:06:42 +01:00
Charlie McConnell
fb64948746 unix: do not set environ unless one is provided
Currently, `uv_spawn` will set `environ` to the value of `options.env`, even if
`options.env` is `NULL`.  This results in child processes for whom `environ ==
NULL`, which can cause a variety of unexpected issues.

This is a back-port of commit 1d85815 from the master branch.
2012-11-03 01:41:10 +01:00
Charlie McConnell
1d858156b4 unix: do not set environ unless one is provided
Currently, `uv_spawn` will set `environ` to the value of `options.env`, even if
`options.env` is `NULL`.  This results in child processes for whom `environ ==
NULL`, which can cause a variety of unexpected issues.
2012-11-03 01:37:22 +01:00