
This required a fair bit of plumbing. The CharacterDevice::close() virtual will now be closed by ~FileDescriptor(), allowing device implementations to do custom cleanup at that point. One big problem remains: if the master PTY is closed before the slave PTY, we go into crashy land.
20 lines
348 B
C++
20 lines
348 B
C++
#include "CharacterDevice.h"
|
|
#include <LibC/errno_numbers.h>
|
|
|
|
CharacterDevice::~CharacterDevice()
|
|
{
|
|
}
|
|
|
|
RetainPtr<FileDescriptor> CharacterDevice::open(int& error, int options)
|
|
{
|
|
return VFS::the().open(*this, error, options);
|
|
}
|
|
|
|
void CharacterDevice::close()
|
|
{
|
|
}
|
|
|
|
int CharacterDevice::ioctl(Process&, unsigned, unsigned)
|
|
{
|
|
return -ENOTTY;
|
|
}
|