[haiku-bugs] Re: [Haiku] #14738: [pc_serial] Sometimes gets stuck in Write() (even in async mode)

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Tue, 08 Jan 2019 18:47:50 -0000

#14738: [pc_serial] Sometimes gets stuck in Write() (even in async mode)
---------------------------+----------------------------
   Reporter:  ttcoder      |      Owner:  mmu_man
       Type:  bug          |     Status:  assigned
   Priority:  normal       |  Milestone:  Unscheduled
  Component:  Drivers/TTY  |    Version:  R1/Development
 Resolution:               |   Keywords:
 Blocked By:               |   Blocking:
Has a Patch:  0            |   Platform:  All
---------------------------+----------------------------

Comment (by pulkomandy):

 The driver cannot do much about this.

 The idea of this is that an application should reply immediately to
 signals (for example when you press control + C). So, if it is blocked in
 a system call (such as read() or write()), that will be interrupted and
 return EINTR to signal it to the application.

 The application can then handle the signal, and restart its system call.

 Alternatively, you can set SA_RESTART on the signal settings to let the
 syscall be retried automatically.

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14738#comment:7>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: