Bug 11184 – Win64: killing process with invalid handle terimates current process

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2013-10-06T09:34:00Z
Last change time
2014-02-28T00:05:08Z
Assigned to
nobody
Creator
r.sagitario

Comments

Comment #0 by r.sagitario — 2013-10-06T09:34:12Z
module test; import std.process; import std.stdio; void main() { scope(exit) writeln("Goodbye"); writeln("spawn"); auto pid = spawnProcess(["find.exe"]); writeln("wait"); wait(pid); writeln("kill"); kill(pid); } compiled with "dmd -m64 test.d" yields this output: spawn wait FIND: Parameter format not correct kill while it prints "Goodbye" if the kill is not called. This is caused by the current process being terminated by kill (the fix is versioned for Win32 only). Fix is part of this PR: https://github.com/D-Programming-Language/phobos/pull/1411/files#diff-8ac4ebb5dcc368ac0e9b7b9f118aa824L1299
Comment #1 by r.sagitario — 2014-02-28T00:05:08Z