Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
On Jan 15 13:41, Christian Franke wrote: > Corinna Vinschen wrote: > > On Jan 15 13:07, Corinna Vinschen wrote: > > > Sorry Christian, but.. > > > > > > I was just going to push this patch when I realized that we now have > > > two lines of debug output per affected file descriptor: > > > > > >

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Christian Franke
^^^ syscall_printf Attached. From ca97bb30210d3c90ae94f5ff29ddd75a12a8a8b1 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Mon, 15 Jan 2024 13:36:30 +0100 Subject: [PATCH] Cygwin: introduce close_range(2) This function closes or sets the clos

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
On Jan 15 13:07, Corinna Vinschen wrote: > Sorry Christian, but.. > > I was just going to push this patch when I realized that we now have > two lines of debug output per affected file descriptor: > > On Jan 15 12:19, Christian Franke wrote: > > + for (unsigned int i = firstfd; i < size; i++) >

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
Sorry Christian, but.. I was just going to push this patch when I realized that we now have two lines of debug output per affected file descriptor: On Jan 15 12:19, Christian Franke wrote: > + for (unsigned int i = firstfd; i < size; i++) > +{ > + cygheap_fdget cfd ((int) i, false,

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Christian Franke
Franke Date: Mon, 15 Jan 2024 12:13:30 +0100 Subject: [PATCH] Cygwin: introduce close_range(2) This function closes or sets the close-on-exec flag for a specified range of file descriptors. It is available on FreeBSD and Linux. Signed-off-by: Christian Franke --- newlib/libc/include/sys

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
. Threads always share descriptors, processes never share file desriptors. The bottom line is, I think the decision of the FreeBSD developer not to expose the CLOSE_RANGE_UNSHARE flag at all, was the right decision. We should not claim that we even remotely have a way of doing this the Linux

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Corinna Vinschen
On Jan 14 19:53, Christian Franke wrote: > Jon Turney wrote: > > On 14/01/2024 16:07, Christian Franke wrote: > > > Recently I learned about the existence and usefulness of close_range(): > > > https://github.com/smartmontools/smartmontools/issues/235 > > > > > >

Re: [PATCH] Cygwin: introduce close_range

2024-01-15 Thread Christian Franke
ded to simply ignore CLOSE_RANGE_UNSHARE for now. From f7704bf77a926e53e8200528ab6abc1c9fdca511 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Mon, 15 Jan 2024 09:52:50 +0100 Subject: [PATCH] Cygwin: introduce close_range(2) This function closes or sets the close-on-exec flag for a specified ran

Re: [PATCH] Cygwin: introduce close_range

2024-01-14 Thread Christian Franke
Jon Turney wrote: On 14/01/2024 16:07, Christian Franke wrote: Recently I learned about the existence and usefulness of close_range(): https://github.com/smartmontools/smartmontools/issues/235 https://man.freebsd.org/cgi/man.cgi?query=close_range=2

Re: [PATCH] Cygwin: introduce close_range

2024-01-14 Thread Jon Turney
On 14/01/2024 16:07, Christian Franke wrote: Recently I learned about the existence and usefulness of close_range(): https://github.com/smartmontools/smartmontools/issues/235 https://man.freebsd.org/cgi/man.cgi?query=close_range=2 https://man7.org/linux/man-pages/man2/close_range.2.html Note

[PATCH] Cygwin: introduce close_range

2024-01-14 Thread Christian Franke
his :-) -- Regards, Christian From 2393e82a62e19e29e61ef3253e227c19ae7222eb Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 14 Jan 2024 16:54:17 +0100 Subject: [PATCH] Cygwin: introduce close_range This function closes or sets the close-on-exec flag for a specified range of file descripto