[−][src]Function winconsole::console::generate_ctrl_event
pub fn generate_ctrl_event(
break_event: bool,
process_group_id: impl Into<Option<u32>>
) -> WinResult<()>
Sends a ctrl signal to a process group which shares the console.
Arguments
break_event
- Should a CTRL + BREAK signal be generated? Otherwise, a CTRL + C signal will be generated. A CTRL + C signal cannot be generated for a process group.process_group_id
- The ID of the process group to generate the event on. If None, generate the event on processes which share the console.
Examples
Generates a CTRL event.
console::generate_ctrl_event(false, None).unwrap();
Errors
IoError
: Returned if an OS error occurs.