[PATCH 02/10] remote: Eliminate remote_hostio_close_cleanup
Tom Tromey
tom@tromey.com
Wed May 16 17:43:00 GMT 2018
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> + ~scoped_remote_fd ()
Pedro> + {
Pedro> + if (m_fd != -1)
Pedro> + {
Pedro> + int remote_errno;
Pedro> + remote_hostio_close (find_target_at (process_stratum),
Pedro> + m_fd, &remote_errno);
The only danger here is if remote_hostio_close can throw. However, this
was already a danger (in theory) before the patch -- there is a rule
(perhaps unwritten and/or unenforced) that one cannot throw during a
"do_cleanups".
I didn't look but some assurance that this can't happen would be good to
have.
Tom
More information about the Gdb-patches
mailing list