mirror of
https://github.com/Zygo/bees.git
synced 2025-06-16 17:46:16 +02:00
fd: make the close method on IOHandle private
Fd's cache does not handle changes in the state of its IOHandle parameter. If we allow: Fd f; f->close(); then Fd ends up caching a pointer to a closed Fd, and will become very badly confused if a new Fd appears with the same int identifier. Fix by removing the close method. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -35,11 +35,11 @@ namespace crucible {
|
||||
IOHandle& operator=(IOHandle &&) = delete;
|
||||
IOHandle& operator=(const IOHandle &) = delete;
|
||||
int m_fd;
|
||||
void close();
|
||||
public:
|
||||
virtual ~IOHandle();
|
||||
IOHandle(int fd = -1);
|
||||
int get_fd() const;
|
||||
void close();
|
||||
};
|
||||
|
||||
class Fd {
|
||||
|
Reference in New Issue
Block a user