Skip to content

Commit 5c5fe4d

Browse files
authored
Fix fd leak (#9362)
Make sure we don't leak file descriptors when done with pipes. Addresses an issue seen while running slang-rhi-test for #9335.
1 parent 12b9782 commit 5c5fe4d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/core/unix/slang-unix-process.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class UnixPipeStream : public Stream
7575
{
7676
}
7777

78+
~UnixPipeStream() SLANG_OVERRIDE { close(); }
79+
7880
protected:
7981
/// This read file descriptor non blocking. Doing so will change the behavior of
8082
/// read - it can fail and return an error indicating there is no data, instead of blocking.

0 commit comments

Comments
 (0)