00:14:10  * saheljoined
00:24:12  * sahelquit (Remote host closed the connection)
00:30:24  * bnoordhuisjoined
00:31:53  * smorinquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:34:38  * smorinjoined
00:35:03  * bnoordhuisquit (Ping timeout: 240 seconds)
00:36:15  * smorinquit (Client Quit)
00:42:51  * saheljoined
00:43:03  * sahelquit (Client Quit)
00:45:58  * evanluca_joined
00:47:57  * evanlucasquit (Ping timeout: 276 seconds)
01:11:55  * Fishrock123quit (Remote host closed the connection)
01:30:37  * petka____quit (Quit: Connection closed for inactivity)
01:59:51  * happy-dudequit (Quit: Connection closed for inactivity)
02:01:23  * evanluca_quit (Read error: Connection reset by peer)
02:01:23  * importantshockquit (Remote host closed the connection)
02:04:07  * evanlucasjoined
02:11:19  * etnbrdjoined
02:51:35  * dap_quit (Quit: Leaving.)
02:53:29  * brsonquit (Ping timeout: 240 seconds)
02:56:30  * dap_joined
02:57:47  * Fishrock123joined
03:05:23  * Fishrock123quit (Quit: Leaving...)
03:07:34  * importantshockjoined
03:59:49  * evanlucasquit (Read error: Connection reset by peer)
04:00:26  * evanlucasjoined
04:55:42  * importantshockquit (Remote host closed the connection)
05:15:42  * evanlucasquit (Read error: Connection reset by peer)
05:16:20  * evanlucasjoined
05:29:20  * evanlucasquit (Read error: Connection reset by peer)
05:30:01  * evanlucasjoined
06:26:03  * smorinjoined
06:31:22  * evanluca_joined
06:31:31  * evanlucasquit (Read error: Connection reset by peer)
06:36:03  * txdvquit (Ping timeout: 240 seconds)
06:43:45  * txdvjoined
06:59:07  * seishunjoined
07:12:35  * smorinquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:23:49  * evanlucasjoined
07:23:56  * evanluca_quit (Read error: Connection reset by peer)
07:43:57  * evanluca_joined
07:44:04  * evanlucasquit (Read error: Connection reset by peer)
07:47:09  <saghul>samrg472: you must free the handle in the on_close callback, you must close the handle with uv_close
07:48:50  * evanluca_quit (Read error: Connection reset by peer)
07:49:53  * evanlucasjoined
08:03:04  * seishunquit (Ping timeout: 240 seconds)
08:34:20  * Perilous_quit (Remote host closed the connection)
08:35:20  * PerilousApricotjoined
08:39:45  * PerilousApricotquit (Ping timeout: 250 seconds)
08:43:06  * brrtjoined
08:44:06  * petka____joined
08:55:05  * evanlucasquit (Read error: Connection reset by peer)
08:55:24  * evanlucasjoined
09:22:51  * brrtpart ("Good Bye")
10:23:42  * davijoined
10:41:04  * daviquit (Ping timeout: 240 seconds)
10:44:29  * bnoordhuisjoined
11:40:11  * rendarjoined
12:13:23  * importantshockjoined
12:19:55  * evanlucasquit (Read error: Connection reset by peer)
12:20:14  * evanlucasjoined
12:45:55  * bnoordhuisquit (Ping timeout: 248 seconds)
13:09:59  * samrg472quit (Ping timeout: 240 seconds)
13:20:15  * importantshockquit (Remote host closed the connection)
13:22:32  * importantshockjoined
13:45:14  * importantshockquit (Remote host closed the connection)
13:47:15  * evanlucasquit (Read error: Connection reset by peer)
13:47:34  * evanlucasjoined
13:51:49  * bnoordhuisjoined
13:56:22  * bnoordhuisquit (Ping timeout: 255 seconds)
14:28:53  * importantshockjoined
14:36:32  * PerilousApricotjoined
14:40:43  * PerilousApricotquit (Ping timeout: 250 seconds)
15:00:24  * PerilousApricotjoined
15:00:26  * PerilousApricotquit (Remote host closed the connection)
15:31:25  * PerilousApricotjoined
15:36:37  * importantshockquit (Remote host closed the connection)
15:38:51  * bnoordhuisjoined
15:39:37  * importantshockjoined
15:44:36  * importantshockquit (Remote host closed the connection)
15:45:10  * importantshockjoined
15:52:39  * alexforsterjoined
16:02:35  * Fishrock123joined
16:21:43  * bnoordhuisquit (Ping timeout: 255 seconds)
16:24:35  * happy-dudejoined
16:30:33  * davijoined
16:32:11  * yunong_joined
16:34:15  * yunongquit (Ping timeout: 250 seconds)
16:46:58  * seishunjoined
16:48:29  * bnoordhuisjoined
17:50:13  * importan_joined
17:50:31  * importantshockquit (Ping timeout: 250 seconds)
18:51:50  * importan_quit (Remote host closed the connection)
18:52:49  * brsonjoined
18:52:50  * importantshockjoined
18:53:57  * importantshockquit (Remote host closed the connection)
19:09:57  * daviquit (Ping timeout: 244 seconds)
19:10:08  * fierydrakejoined
19:19:21  * importantshockjoined
19:24:11  * benjamingr__joined
19:36:47  * brsonquit (Ping timeout: 244 seconds)
19:38:36  * brsonjoined
20:17:36  * importantshockquit (Remote host closed the connection)
20:37:47  * brsonquit (Ping timeout: 244 seconds)
20:45:15  * importantshockjoined
20:49:52  * brsonjoined
22:26:53  <ralt>saghul: can I assume that if a system has mkostemp, it also has O_CLOEXEC?
22:36:45  <rendar>ralt: hmm what is mkostemp?
22:37:11  <rendar>ralt: ok it's for unique temp files, but how it's related with O_CLOEXEC?
22:38:03  <bnoordhuis>ralt: mkostemp can still fail with EINVAL if the kernel doesn't understand the O_CLOEXEC flag
22:38:52  <bnoordhuis>rendar: O_CLOEXEC is to avoid fd leaks when racing with fork() calls in other threads
22:39:45  <rendar>bnoordhuis: yeah i know the purpose of that flag, but why should it be related with mkostemp?
22:40:35  <bnoordhuis>rendar: because mkostemp returns a file descriptor :)
22:44:27  <ralt>bnoordhuis: hm, so I guess I should check for O_CLOEXEC support.
22:44:50  <ralt>(and only use mkostemp() in this case)
22:45:23  <ralt>since the fallback path uses uv__cloexec(), it'll be fine
22:46:34  <bnoordhuis>not quite, i think. on linux, you should try mkostemp + O_CLOEXEC first and only use the fallback when it fails with EINVAL
22:46:52  <bnoordhuis>ralt: apologies, UV__O_CLOEXEC
22:47:15  <bnoordhuis>you can lift the freebsd code for that #define in src/unix/core.c to e.g. src/unix/internal.h
22:48:59  * seishunquit (Ping timeout: 240 seconds)
22:50:17  <ralt>bnoordhuis: thanks
22:51:56  <ralt>bnoordhuis: hm, EINVAL means something else for mkostemp() though
22:52:02  <ralt>it means that the template was malformed
22:52:48  <ralt>well, it can mean both
22:53:42  <ralt>in fact... given the man page, I'm not sure if there exists versions where mkostemp() exists but not UV__O_CLOEXEC
22:54:08  <rendar>bnoordhuis: oh, i see, so it's like pipe2() or accept4() which, since they effectively create fds, we could pass those flags at the creation time, so we don't call 2 syscalls
22:56:19  <ralt>if I check EINVAL, it means that I have to call mkostemp(), and then mkstemp(). Is that better than checking for O_CLOEXEC support, similarly to what we do in uv__fs_open?
23:09:17  <ralt>(my biggest issue is trying twice with an invalid template, aka going to the fallback path on a system supporting mkostemp() and O_CLOEXEC properly)
23:17:56  <bnoordhuis>ralt: "given the man page, I'm not sure if there exists versions where mkostemp() exists but not UV__O_CLOEXEC" <- think newer glibc on older kernel
23:18:59  <bnoordhuis>ralt: more to the point, mkostemp() calls open() which until linux 2.6.23 didn't understand O_CLOEXEC
23:20:53  <ralt>bnoordhuis: so you're not concerned by the fact we're going to call mkstemp() on systems that support both mkostemp() and O_CLOEXEC if the template is malformed?
23:22:30  <bnoordhuis>ralt: how could that happen unless there's a libuv bug? libuv prepares the template, right?
23:23:24  <ralt>bnoordhuis: not for mkdtemp, at least
23:23:31  <ralt>(so I haven't done that for mkstemp either)
23:25:09  <bnoordhuis>i thought you and saghul agreed that the user won't pass in the XXXXXX?
23:25:21  <ralt>bnoordhuis: that's in nodejs land
23:25:48  <bnoordhuis>why would you do it differently in libuv?
23:25:50  <ralt>uv_fs_mkdtemp, already in libuv, doesn't handle the template at all
23:27:06  <bnoordhuis>oh right
23:27:19  <bnoordhuis>well boo
23:27:38  <ralt>^^
23:27:55  <bnoordhuis>in that case i guess you'll have to do a manual precheck that it ends in XXXXXX
23:27:55  <ralt>in itself, I'm fine with this codepath
23:28:59  <ralt>and return EINVAL manually?
23:29:04  <bnoordhuis>yes
23:29:21  <ralt>ok
23:30:44  <bnoordhuis>alright, i'm calling it a night. have to get up in 6.5 hours again
23:34:58  * bnoordhuisquit (Ping timeout: 244 seconds)
23:38:33  * dap_quit (Quit: Leaving.)
23:39:11  * rendar_joined
23:42:16  * rendarquit (Ping timeout: 255 seconds)
23:50:25  * alexforsterquit (Quit: Textual IRC Client: www.textualapp.com)
23:56:41  * importantshockquit (Remote host closed the connection)