Make workerPids() work on Windows using WMIC instead of ps #94

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

richardkmiller commented Mar 12, 2013

exec('ps...') fails on Windows -- switch to equivalent Windows command

Contributor

danhunsaker commented Mar 13, 2013

Is WMIC available by default, or does it need to be installed separately?

Though it would certainly be nice to not have to use exec() for anything in the first place...

Contributor

richardkmiller commented Mar 13, 2013

WMIC is installed by default. Agreed that it'd be nice not to use exec().

It just occurred to me that my Windows worker code depends on an ugly hack: Because Windows does not provide process forking, Windows workers won't run without changing Worker.php:190 to "if (true)" to run as the child. It's orthogonal to this patch, but Windows workers won't run without it. I'll try to make that less hackish and submit a patch.

Contributor

richardkmiller commented Jun 19, 2013

Closing this because it's essentially the same as #93. I took a few iterations to get there but the result is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment