• Roland Knall's avatar
    extcap: Use stderr to print error message · c611eded
    Roland Knall authored
    This patch reads out the stderr messages from an extcap
    utility and displays it to an user. It was tested on Qt
    but not on GTK, but should work their as well.
    On Mac OS/X and Windows the child_watch does not behave
    as it was intended. Therefore in extcap_cleanup, the callbacks
    are called manually, if and only if, they have not been
    called already.
    The reason why it displays two error messages is, that
    by the time the first one is being displayed, glib has not
    returned from the spawned process on Linux yet. So there
    is no way to add the stderr correctly, and putting a handler
    to stderr into interface_opts will lead to memory errors,
    cause then the code tries to access memory outside of its
    Bug: 11892
    Change-Id: I2db60dd480fed3e01428b91a705057e4f088bd15
    Reviewed-on: https://code.wireshark.org/review/12954Reviewed-by: 's avatarRoland Knall <rknall@gmail.com>
    Petri-Dish: Roland Knall <rknall@gmail.com>
    Tested-by: 's avatarPetri Dish Buildbot <buildbot-no-reply@wireshark.org>
    Reviewed-by: 's avatarDario Lombardo <lomato@gmail.com>
    Reviewed-by: 's avatarAnders Broman <a.broman58@gmail.com>
extcap_spawn.h 1.86 KB