Bug #9589

ldterm_dosig() can send empty mblks downstream

Added by Andy Fiddaman 9 months ago. Updated 8 months ago.

Status:ClosedStart date:2018-06-09
Priority:NormalDue date:
Assignee:Andy Fiddaman% Done:

100%

Category:driver - device drivers
Target version:-
Difficulty:Hard Tags:

Description

When processing a signal, ldterm can end up sending an empty echo mblk down the stream.
If the owning application was NOT compiled with xpg4/6-values.o, then the empty mblk will be dropped in the

ptem
module (ref http://src.illumos.org/source/xref/illumos-gate/usr/src/uts/common/io/ptem.c#565 )
However, otherwise it will be passed to the application and often treated as equivalent to an EOF.

One example of this is with the

tmux
utility. It works fine on illumos in non-xpg4 mode but not with xpg4 - in the latter, pressing ^C will cause tmux to exit.

There is no need for these empty mblks to be sent.

History

#2 Updated by Andy Fiddaman 9 months ago

bloody% tmux
...
bloody% echo $TMUX_PANE
%0
bloody% cat
^C
zsh: interrupt  cat

#3 Updated by Electric Monk 8 months ago

  • % Done changed from 80 to 100
  • Status changed from New to Closed

git commit cfad065142375b14439598ab13b09a95be0ad333

commit  cfad065142375b14439598ab13b09a95be0ad333
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2018-06-08T03:04:14.000Z

    9589 ldterm_dosig() can send empty mblks downstream
    Reviewed by: Dominik Hassler <hadfl@omniosce.org>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom