Handle leak in sb-ext:run-program on Windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Calling sb-ext:run-program creates a new handle and keeps it even after the process exited on Windows.
## Reproducible Flow
1. Create a file run-wmic.lisp
;; run-wmic.lisp
(loop
(sb-ext:
(princ ".") (force-output)
(sleep 1))
2. Load it with SBCL
$ sbcl --load run-wmic.lisp
3. Check the number of handles with Task Manager
## Environment
SBCL 1.3.15
Windows 10 Home
*features*
(:QUICKLISP :QUICKLISP-
:ASDF2 :ASDF :OS-WINDOWS :NON-BASE-
:64-BIT :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS
:C-STACK-
:COMPLEX-
:GENCGC :IEEE-FLOATING-
:LITTLE-ENDIAN :MEMORY-
:OS-PROVIDES-PUTWC :PACKAGE-
:RAW-INSTANCE-
:SB-FUTEX :SB-LDB :SB-PACKAGE-LOCKS :SB-QSHOW :SB-SAFEPOINT
:SB-SAFEPOINT-
:SB-THRUPTION :SB-TRACEROOT :SB-UNICODE :SB-WTIMER :SBCL
:STACK-
:STACK-
:STACK-
:UNDEFINED-
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
On Wed 18 Oct 2017 at 07:38, Eitaro Fukamachi <email address hidden> wrote:
> Calling sb-ext:run-program creates a new handle and keeps it even after
> the process exited on Windows.
Can confirm.
We found this in
id:<email address hidden>
but I mistakenly thought it was a FD_SETSIZE problem.
After realising, that it was a leak, this workaround worked for our
specific use-case:
;; :error *error-output* leaks file descriptors on windows
:error #+(or mswindows windows) :output
#-(or mswindows windows) *error-output*