Skip to main content

apply_fetch_completion_policy

Function apply_fetch_completion_policy 

Source
pub fn apply_fetch_completion_policy(command: Command) -> Command
Expand description

Apply the shared completion policy to a network command.

The policy applies FETCH_TIMEOUT_GRACE to both timeout and cancellation. On Windows it additionally opts the direct console child into CTRL_BREAK, so a child that handles the event can flush buffers, close connections, and release locks during the grace window. Delivery requires a console shared with the child; GUI/service callers without one and children created with Command::create_no_window or DETACHED_PROCESS receive no console event. Windowed children may still receive processkit’s best-effort WM_CLOSE, and any survivor is hard-killed after the grace window. On Unix the Windows builder is a no-op, so the existing signal → grace → hard-kill semantics are unchanged. The helper does not alter the structured cancellation outcome.