Fix Windows launcher resource leak
parent
988ae29864
commit
1518d63115
|
@ -1,7 +1,7 @@
|
||||||
IN: io.windows.launcher.nt.tests
|
IN: io.windows.launcher.nt.tests
|
||||||
USING: io.launcher tools.test calendar accessors
|
USING: io.launcher tools.test calendar accessors
|
||||||
namespaces kernel system arrays io io.files io.encodings.ascii
|
namespaces kernel system arrays io io.files io.encodings.ascii
|
||||||
sequences parser assocs hashtables ;
|
sequences parser assocs hashtables math ;
|
||||||
|
|
||||||
[ ] [
|
[ ] [
|
||||||
<process>
|
<process>
|
||||||
|
@ -129,3 +129,14 @@ sequences parser assocs hashtables ;
|
||||||
|
|
||||||
"HOME" swap at "XXX" =
|
"HOME" swap at "XXX" =
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
2 [
|
||||||
|
[ ] [
|
||||||
|
<process>
|
||||||
|
"cmd.exe /c dir" >>command
|
||||||
|
"dir.txt" temp-file >>stdout
|
||||||
|
try-process
|
||||||
|
] unit-test
|
||||||
|
|
||||||
|
[ ] [ "dir.txt" temp-file delete-file ] unit-test
|
||||||
|
] times
|
||||||
|
|
|
@ -39,7 +39,7 @@ IN: io.windows.nt.launcher
|
||||||
create-mode
|
create-mode
|
||||||
FILE_ATTRIBUTE_NORMAL ! flags and attributes
|
FILE_ATTRIBUTE_NORMAL ! flags and attributes
|
||||||
f ! template file
|
f ! template file
|
||||||
CreateFile dup invalid-handle? dup close-later ;
|
CreateFile dup invalid-handle? dup close-always ;
|
||||||
|
|
||||||
: set-inherit ( handle ? -- )
|
: set-inherit ( handle ? -- )
|
||||||
>r HANDLE_FLAG_INHERIT r> >BOOLEAN SetHandleInformation win32-error=0/f ;
|
>r HANDLE_FLAG_INHERIT r> >BOOLEAN SetHandleInformation win32-error=0/f ;
|
||||||
|
|
Loading…
Reference in New Issue