[libvirt] [PATCH] Prevent streams from becoming libvirtd controlling TTY

Eric Blake eblake at redhat.com
Wed Mar 13 22:33:34 UTC 2013


On 03/13/2013 11:24 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> When opening a stream to a device which is a TTY, that device
> may become the controlling TTY of libvirtd, if libvirtd was
> daemonized. This in turn means when the other end of the stream
> closes, libvirtd gets SIGHUP, causing it to reload its config.
> Prevent this by forcing O_NOCTTY on all streams that are opened
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/fdstream.c | 2 ++
>  1 file changed, 2 insertions(+)

ACK.  Bet you had fun tracking down that dark corner of POSIX.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130313/cfcc0ba8/attachment-0001.sig>


More information about the libvir-list mailing list