]> git.ipfire.org Git - thirdparty/libvirt.git/commit
fdstream: Add internal callback on stream close
authorPeter Krempa <pkrempa@redhat.com>
Thu, 23 Feb 2012 12:45:25 +0000 (13:45 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Feb 2012 14:05:17 +0000 (15:05 +0100)
commit0c4bfdda42f176633a9db7c52703802e3f0123fe
tree89978487dbde1b40a2c52f0993ba476b83b4d7aa
parent95fdc1bc2b397909b9cefacf9ff91924897f5af4
fdstream: Add internal callback on stream close

This patch adds another callback to a FDstream object. The original
callback is used by the daemon stream driver to handle events.

This callback is called if and only if the stream is about to be closed.
This might be used to handle cleanup steps after a fdstream exits. This
will be used later on in ensuring mutually exclusive access to consoles.

* src/fdstream.c:
        - emit the callback, when stream is being closed
        - add data structures needed to handle the callback
        - add function to register callback
* src/fdstream.h:
        - define function prototypes for the callback
src/fdstream.c
src/fdstream.h