This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Don't set terminal flags twice in a row
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 06 Nov 2017 17:47:28 -0500
- Subject: [binutils-gdb] Don't set terminal flags twice in a row
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT a94799ac1e430404fda5cbc181406cf5f3630108 ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: a94799ac1e430404fda5cbc181406cf5f3630108
Don't set terminal flags twice in a row
I find this odd 'set flags twice' ancient code and comment annoyingly
distracting. It may well be that the reason for the double-set was
simply a copy/paste mistake, and that we've been doing this for
decades [1] for no good reason. Let's just get rid of it, and if we
find a real reason, add it back with a comment explaining why it's
necessary.
[1] This double-set was already in gdb 2.4 / 1988, the oldest release
we have sources for, and imported in git. From 'git show 7b4ac7e1ed2c
inflow.c':
+void
+terminal_inferior ()
+{
+ if (terminal_is_ours) /* && inferior_thisrun_terminal == 0) */
+ {
+ fcntl (0, F_SETFL, tflags_inferior);
+ fcntl (0, F_SETFL, tflags_inferior);
The "is there a reason" comment was added in 1993, by:
commit a88797b5eadf31e21804bc820429028bf708fbcd
Author: Fred Fish <fnf@specifix.com>
AuthorDate: Thu Aug 5 01:33:45 1993 +0000
gdb/ChangeLog:
2017-11-06 Pedro Alves <palves@redhat.com>
* inflow.c (child_terminal_inferior, child_terminal_ours_1): No
longer set flags twice in row.
- Follow-Ups:
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master
- Failures on Ubuntu-AArch32-m32, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master