Lines Matching refs:err
85 int err; in uv__stream_init() local
102 err = uv__open_cloexec("/dev/null", O_RDONLY); in uv__stream_init()
103 if (err < 0) in uv__stream_init()
107 err = uv__open_cloexec("/", O_RDONLY); in uv__stream_init()
108 if (err >= 0) in uv__stream_init()
109 loop->emfile_fd = err; in uv__stream_init()
285 int err; in uv__stream_try_select() local
335 err = UV_ENOMEM; in uv__stream_try_select()
346 err = uv_async_init(stream->loop, &s->async, uv__stream_osx_select_cb); in uv__stream_try_select()
347 if (err) in uv__stream_try_select()
353 err = uv_sem_init(&s->close_sem, 0); in uv__stream_try_select()
354 if (err != 0) in uv__stream_try_select()
357 err = uv_sem_init(&s->async_sem, 0); in uv__stream_try_select()
358 if (err != 0) in uv__stream_try_select()
369 err = uv_thread_create(&s->thread, uv__stream_osx_select, stream); in uv__stream_try_select()
370 if (err != 0) in uv__stream_try_select()
389 return err; in uv__stream_try_select()
398 return err; in uv__stream_try_select()
485 int err; in uv__emfile_trick() local
495 err = uv__accept(accept_fd); in uv__emfile_trick()
496 if (err >= 0) in uv__emfile_trick()
497 uv__close(err); in uv__emfile_trick()
498 } while (err >= 0 || err == UV_EINTR); in uv__emfile_trick()
504 return err; in uv__emfile_trick()
510 int err; in uv__server_io() local
519 err = uv__accept(fd); in uv__server_io()
521 if (err == UV_EMFILE || err == UV_ENFILE) in uv__server_io()
522 err = uv__emfile_trick(loop, fd); /* Shed load. */ in uv__server_io()
524 if (err < 0) in uv__server_io()
527 stream->accepted_fd = err; in uv__server_io()
537 int err; in uv_accept() local
547 err = uv__stream_open(client, in uv_accept()
550 if (err) { in uv_accept()
558 err = uv_udp_open((uv_udp_t*) client, server->accepted_fd); in uv_accept()
559 if (err) { in uv_accept()
594 if (err == 0) in uv_accept()
597 return err; in uv_accept()
602 int err; in uv_listen() local
608 err = uv__tcp_listen((uv_tcp_t*)stream, backlog, cb); in uv_listen()
612 err = uv__pipe_listen((uv_pipe_t*)stream, backlog, cb); in uv_listen()
616 err = UV_EINVAL; in uv_listen()
619 if (err == 0) in uv_listen()
622 return err; in uv_listen()
628 int err; in uv__drain() local
647 err = 0; in uv__drain()
650 err = UV_ECANCELED; in uv__drain()
652 err = UV__ERR(errno); in uv__drain()
657 req->cb(req, err); in uv__drain()
986 int err; in uv__stream_recv_cmsg() local
989 err = 0; in uv__stream_recv_cmsg()
1009 if (err == 0) { in uv__stream_recv_cmsg()
1013 err = uv__stream_queue_fd(stream, fd); in uv__stream_recv_cmsg()
1016 if (err != 0) in uv__stream_recv_cmsg()
1021 return err; in uv__stream_recv_cmsg()
1031 int err; in uv__read() local
1118 err = uv__stream_recv_cmsg(stream, &msg); in uv__read()
1119 if (err != 0) { in uv__read()
1120 stream->read_cb(stream, err, &buf); in uv__read()
1138 err = uv__stream_recv_cmsg(stream, &msg); in uv__read()
1139 if (err != 0) { in uv__read()
1140 stream->read_cb(stream, err, &buf); in uv__read()
1340 int err; in uv_write2() local
1342 err = uv__check_before_write(stream, nbufs, send_handle); in uv_write2()
1343 if (err < 0) in uv_write2()
1344 return err; in uv_write2()
1425 int err; in uv_try_write2() local
1431 err = uv__check_before_write(stream, nbufs, NULL); in uv_try_write2()
1432 if (err < 0) in uv_try_write2()
1433 return err; in uv_try_write2()