Fix an issue where resolveKill() emits a warning if the future was never started
ClosedPublic

Authored by epriestley on Tue, Feb 14, 3:17 PM.

Details

Summary

Ref T2794. This is a minor warning I hit while exploring Phage stuff. In Phage, we can resolveKill() a future that we never called start() on, which tries to proc_terminate() a process which never spawned. This emits a warning.

Instead, check that $this->proc exists before signaling it.

Test Plan

Added a unit test.

Diff Detail

Repository
rPHU libphutil
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
epriestley created this revision.Tue, Feb 14, 3:17 PM
chad accepted this revision.Tue, Feb 14, 3:25 PM
This revision is now accepted and ready to land.Tue, Feb 14, 3:25 PM
This revision was automatically updated to reflect the committed changes.