pub struct ForegroundGuard { /* private fields */ }Expand description
Keeps a specific already existing process in the foreground as long as the ForegroundGuard.
If the process needs to be spawned in the foreground, use ForegroundChild instead. This is
used to temporarily bring frozen and plugin processes into the foreground.
§OS-specific behavior
§Unix
If there is already a foreground external process running, spawned with ForegroundChild,
this expects the process ID to remain in the process group created by the ForegroundChild
for the lifetime of the guard, and keeps the terminal controlling process group set to that.
If there is no foreground external process running, this sets the foreground process group to
the provided process ID. The process group that is expected can be retrieved with
.pgrp() if different from the provided process ID.
§Other systems
It does nothing special on non-unix systems.