puppetlabs/puppet — pull request #2398 by joshcooper (2014-02-28 05:45:01+00:00)
Title: (PUP-1275) Never try to fork on Windows

In 3.0.2, in commit 4d1a2f83d9 for #17361 restored the ability for *nix
agents to apply a catalog in a forked child process. But the change
caused Windows agents to also try to fork if run without the `--onetime`
flag.

This regression means you can't run Windows agents with `--listen` and
kick them.

This commit adds a `can_fork?` method to ensure we only attempt to fork
if we both can and should fork. There is no change in behavior for *nix
agents.