Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'v0.6'
  • Loading branch information
bnoordhuis committed Jan 19, 2012
2 parents 454e021 + 32b291d commit 517bfc8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion common.gypi
Expand Up @@ -153,7 +153,6 @@
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
'MACOSX_DEPLOYMENT_TARGET': '10.4', # -mmacosx-version-min=10.4
'PREBINDING': 'NO', # No -Wl,-prebind
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
Expand Down
4 changes: 2 additions & 2 deletions gyp_uv
Expand Up @@ -45,12 +45,12 @@ if __name__ == '__main__':

# There's a bug with windows which doesn't allow this feature.
if sys.platform != 'win32':

# Tell gyp to write the Makefiles into output_dir
args.extend(['--generator-output', output_dir])

# Tell make to write its output into the same dir
args.extend(['-Goutput_dir=' + output_dir])
# Create Makefiles, not XCode projects
args.extend('-f make'.split())

args.append('-Dtarget_arch=ia32')
args.append('-Dcomponent=static_library')
Expand Down
2 changes: 0 additions & 2 deletions src/unix/ev/ev_kqueue.c
Expand Up @@ -200,8 +200,6 @@ kqueue_destroy (EV_P)
void inline_size
kqueue_fork (EV_P)
{
close (backend_fd);

while ((backend_fd = kqueue ()) < 0)
ev_syserr ("(libev) kqueue");

Expand Down
6 changes: 2 additions & 4 deletions src/unix/tty.c
Expand Up @@ -120,17 +120,15 @@ uv_handle_type uv_guess_handle(uv_file file) {
struct stat s;

if (file < 0) {
uv__set_sys_error(NULL, EINVAL); /* XXX Need loop? */
return -1;
return UV_UNKNOWN_HANDLE;
}

if (isatty(file)) {
return UV_TTY;
}

if (fstat(file, &s)) {
uv__set_sys_error(NULL, errno); /* XXX Need loop? */
return -1;
return UV_UNKNOWN_HANDLE;
}

if (!S_ISSOCK(s.st_mode) && !S_ISFIFO(s.st_mode)) {
Expand Down
2 changes: 2 additions & 0 deletions test/test-tty.c
Expand Up @@ -27,6 +27,8 @@ TEST_IMPL(tty) {
uv_tty_t tty;
uv_loop_t* loop = uv_default_loop();

ASSERT(UV_UNKNOWN_HANDLE == uv_guess_handle(-1));

/*
* Not necessarily a problem if this assert goes off. E.G you are piping
* this test to a file. 0 == stdin.
Expand Down

0 comments on commit 517bfc8

Please sign in to comment.