[RTEMS Project] #3800: termios - Add Capability to Generate SIGINTR and SIGQUIT

RTEMS trac trac at rtems.org
Tue May 5 02:28:14 UTC 2020


#3800: termios - Add Capability to Generate SIGINTR and SIGQUIT
-----------------------------------+----------------------------
 Reporter:  Joel Sherrill          |       Owner:  Joel Sherrill
     Type:  enhancement            |      Status:  reopened
 Priority:  normal                 |   Milestone:  5.1
Component:  posix                  |     Version:  5
 Severity:  normal                 |  Resolution:
 Keywords:  termios, POSIX, EINTR  |  Blocked By:
 Blocking:                         |
-----------------------------------+----------------------------

Comment (by Chris Johns):

 I am attempting to follow the flow of this ticket to see what the issue
 is. Sebastian, Joel pushed the patch on 2 Oct 2019, then you updated the
 ticket with comment:4 around Feb 1 2020 plus a patch to fix the change
 Joel pushed removing references to one of the enum values. The change only
 updated the ticket. It was confusing for me to determining the status and
 action that needs to happen. I have now taken the time to do time.

 In regards to `enum`s one of the fixes for ticket #3969 highlights a
 subtle issue with `bool` as a return type then changing code to need more
 return values. There is no upgrade path I consider **clean** or **safe**
 (?) if there is a need to add more return states than a `bool`'s true and
 false. The `libdl` ticket shows what happens if you move to an `enum` from
 `bool` as compilers, coverity etc cannot see enough to know any code that
 was `if (!returned_bool_now_enum()) ...` maybe wrong. In the case of
 `libdl` the `true` or `1` became `.*_no_error` and `0` so a valid or no
 error result was incorrectly handled in code not updated. I think in
 important interfaces an `enum` should be considered desirable even if
 there is only two states and even if only one state is currently being
 used, i.e. what we now have.

 I agree the documentation should indicate how to use the `enum` results
 returned. Can someone please update the enum's comments so a user knows
 how to handle them if returned?

 Thanks

--
Ticket URL: <http://devel.rtems.org/ticket/3800#comment:11>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list