mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-09 21:22:41 +00:00
Unix: make Pipe::Close idempotent
This commit is contained in:
@@ -36,9 +36,15 @@ namespace VeraCrypt
|
||||
void Pipe::Close ()
|
||||
{
|
||||
if (ReadFileDescriptor != -1)
|
||||
{
|
||||
close (ReadFileDescriptor);
|
||||
ReadFileDescriptor = -1;
|
||||
}
|
||||
if (WriteFileDescriptor != -1)
|
||||
{
|
||||
close (WriteFileDescriptor);
|
||||
WriteFileDescriptor = -1;
|
||||
}
|
||||
}
|
||||
|
||||
int Pipe::GetReadFD ()
|
||||
|
||||
Reference in New Issue
Block a user