From: Luca Boccassi Date: Fri, 1 Nov 2024 11:29:19 +0000 (+0000) Subject: util-lib/systemd-run: implement race-free PTY peer opening (#34953) X-Git-Tag: v257-rc1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdccba15be26aa7d62f437cb23df01e28459e50f;p=thirdparty%2Fsystemd.git util-lib/systemd-run: implement race-free PTY peer opening (#34953) This makes use of the new TIOCGPTPEER pty ioctl() for directly opening a PTY peer, without going via path names. This is nice because it closes a race around allocating and opening the peer. And also has the nice benefit that if we acquired an fd originating from some other namespace/container, we can directly derive the peer fd from it, without having to reenter the namespace again. --- fdccba15be26aa7d62f437cb23df01e28459e50f