2.2.4.38 Signal
This type describes the signal values that are used to control the execution of the specific commands or of the Shell processor itself. It defines the format of the s:Body element of the Signal message (for more information, see section 3.1.4.12).
-
<xs:complexType name="Signal"> <xs:sequence> <xs:element name="Code" type="SignalCodeEnumeration" /> </xs:sequence> <xs:attribute name="CommandId" type="xs:anyURI" use="optional" /> </xs:complexType>
Element
Code: This required element MUST contain the control code being sent to the Shell or to a specific command. The value MUST be one of the following URIs:
http://schemas.microsoft.com/wbem/wsman/1/windows/shell/signal/ctrl_c
This value indicates that the Shell MUST attempt to terminate any currently running command or commands and return to an idle state and represents the behavior of Control-C.
http://schemas.microsoft.com/wbem/wsman/1/windows/shell/signal/ctrl_break
This value represents the behavior Control-Break. While most of the tools do not differentiate between Control-Break and Control-C some handle them as separate and different signals. The underlying implementation takes whatever steps are necessary to ensure that the running command can process Control-Break separately from Control-C.
http://schemas.microsoft.com/wbem/wsman/1/windows/shell/signal/Terminate
This control code is sent by the client to acknowledge receipt of the end of the command output from the service and to clean up any resources associated with command execution. Because the service might have to cache this information until it knows that the client has received the entire stream, the client MUST send this before a new command can be executed.
powershell/signal/ctrl_c
This value indicates that the Shell MUST attempt to terminate any currently running command or commands and return to an idle state and represents the behavior of Control-C. This value has the same meaning as the value ending in windows/shell/signal/ctrl_c above.
Attribute
CommandId: This optional attribute directs the signal to a specific command instead of the Shell. If present, it MUST be the one returned in the CommandResponse message. This is used when terminating individual commands.