Project

General

Profile

Bug #9589

ldterm_dosig() can send empty mblks downstream

Added by Andy Fiddaman about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2018-06-09
Due date:
% Done:

100%

Estimated time:
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 about 1 year ago

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

Updated by Electric Monk about 1 year ago

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

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 PDF