rework PTY magic to fix stair-stepping on kfreebsd
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 8 Sep 2014 19:05:11 +0000 (21:05 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 8 Sep 2014 19:05:11 +0000 (21:05 +0200)
commit223ae57d468fdcac451209a095047a07a5698212
tree33ffbc3175d3950f04b50025e6338d244ad40672
parent4c559e97ba4cc0d3a2995b7c451e606539d2f1be
rework PTY magic to fix stair-stepping on kfreebsd

A pty slave we have got from openpty can only be used for one dpkg
child, if we give it to a second child on kfreebsd setting TIOCSCTTY
fails causing the output to be stair-stepped from now on.

By switching the code to creating a master and opening a new slave in
the child for each child we can fix this glitch, so that at least the
master remains stable.

Closes: 759684
apt-pkg/deb/dpkgpm.cc
apt-pkg/deb/dpkgpm.h