[patch] Minor O_CLOEXEC optimization, "regression" fix

Tom Tromey tromey@redhat.com
Tue Oct 8 19:44:00 GMT 2013


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> I just noticed GDB does many needless double-opens with ENOENT like:

Whoops.

Jan> -  if (result == NULL)
Jan> +  if (result != NULL)
Jan> +    fopen_e_ever_succeeded = 1;
Jan> +  else if (!fopen_e_ever_succeeded)

What if we have it check for EINVAL instead?

Tom



More information about the Gdb-patches mailing list