34 #ifndef CARTOBASE_STREAM_FDINHIBITOR_H
35 #define CARTOBASE_STREAM_FDINHIBITOR_H
78 static std::map<std::string, ResetCallback *> & _callbacks();
virtual void operator()(int fd)=0
Temporarily closes a file descriptor (typically, stdout/stderr).
static void registerResetCallback(const std::string &name, ResetCallback *cbk)
static void unregisterResetCallback(const std::string &name)
fdinhibitor(int fd, bool permanent=false)
fd: file descriptor to inhibate, permanent: if false, don't reopen the stream when deleting the fdinh...
static bool hasResetCallback(const std::string &name)
fdinhibitor(FILE *fd, bool permanent=false)
fd: file to inhibate, permanent: if false, don't reopen the stream when deleting the fdinhibitor