#include <nbdkit-plugin.h> int nbdkit_stdio_safe (void);
Overview
The "nbdkit_stdio_safe" utility function returns whether or not it is safe to interact with stdin and stdout during the configuration phase.
This is needed because when the nbdkit -s option is used the plugin must not directly interact with stdin, because that would interfere with network communication.
The result of this function only matters in callbacks up to ".config_complete". Once nbdkit reaches ".get_ready", the plugin should assume that nbdkit may have closed the original stdin and stdout in order to become a daemon.
nbdkit-sh-plugin(3) uses this function to determine whether it is safe to support "script=-" to read a script from stdin. Also constructs like "password=-" (see nbdkit_read_password(3)) are disabled when reading from stdio is not safe.