Hello All,

I'm trying to use uv_fs_open without a callback, but I get "Unknown system 
error 9" when I print the error. Is there something wrong with this code?

Thanks,
-S

uv_loop_t *loop = uv_default_loop();
uv_fs_t   open_req;
uv_fs_t   close_req;
int       ret = 0;

  

  ret = uv_fs_open(loop, &open_req, "/tmp/test.txt", O_CREAT | O_RDWR, 0644, 
NULL);
  
  if(ret)
  {
    fprintf(stderr, "error opening file: %s\n", uv_strerror((int)open_req.
result));

    //fprintf(stderr, "ERROR: Cannot open file\n");
    return(false);
  }

  
  uv_fs_close(loop, &close_req, open_req.result, NULL);



-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to