Fix UnixScript execution (fix #1287)

This commit is contained in:
1024jp 2022-04-30 14:49:10 +09:00
parent b882740ada
commit 7116315851
2 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,11 @@ Change Log
- [beta][trivial] Optimize the performance of the Warnings pane.
### Fixes
- [beta] Fix an issue that UNIX scripts did not terminate.
4.2.0-beta (491)
--------------------------

View File

@ -129,6 +129,7 @@ final class UnixScript: Script {
for chunk in data.components(length: 65_536) {
handle.write(chunk)
}
handle.closeFile()
// inPipe must avoid releasing before `writeabilityHandler` is invocated
inPipe.fileHandleForWriting.writeabilityHandler = nil