public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: introduce close_range
Date: Mon, 15 Jan 2024 13:07:50 +0100	[thread overview]
Message-ID: <ZaUgFoxmOliv6Cok@calimero.vinschen.de> (raw)
In-Reply-To: <7e7efac7-95fe-6d2c-db78-6dd892f93030@t-online.de>

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, false);
> +      if (cfd < 0)
> +	continue;
> +
> +      if (flags & CLOSE_RANGE_CLOEXEC)
> +	{
> +	  syscall_printf ("set FD_CLOEXEC on fd %u", i);
> +	  cfd->fcntl (F_SETFD, FD_CLOEXEC);

fhandler::set_close_on_exec() already prints this:

  debug_printf ("set close_on_exec for %s to %d", get_name (), val);

> +	}
> +      else
> +	{
> +	  syscall_printf ("closing fd %u", i);
> +	  cfd->close_with_arch ();

fhandler::close() already prints this:

  syscall_printf ("closing '%s' handle %p", get_name (), get_handle ());

Shan't we drop the syscall calls from close_range()?


Thanks,
Corinna

  reply	other threads:[~2024-01-15 12:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-14 16:07 Christian Franke
2024-01-14 17:30 ` Jon Turney
2024-01-14 18:53   ` Christian Franke
2024-01-15  8:56     ` Christian Franke
2024-01-15 10:44       ` Corinna Vinschen
2024-01-15 11:19         ` Christian Franke
2024-01-15 12:07           ` Corinna Vinschen [this message]
2024-01-15 12:08             ` Corinna Vinschen
2024-01-15 12:41               ` Christian Franke
2024-01-15 12:56                 ` Corinna Vinschen
2024-01-15  9:50     ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZaUgFoxmOliv6Cok@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).