Compartilhar via


3.3.5.20 Receiving an SMB_COM_PROCESS_EXIT Request

When the server receives an SMB_COM_PROCESS_EXIT Request (section 2.2.4.18.1), it MUST:

  • Enumerate all of the FIDs in Server.Connection.FileOpenTable that were opened by the PID indicated in the request header. For each FID:

    • The server MUST release all locks held on the FID.

    • The server MUST release OpLocks by closing the Open represented by each FID <270> and MUST decrease Open.TreeConnect.OpenCount and Server.Statistics.sts0_fopens by 1 for each FID.

    • The server MUST invalidate the FID by removing the Open entry from Server.Connection.FileOpenTable.

    • The server MUST provide the corresponding Open.FileGlobalId as an input parameter and MUST deregister the Open by invoking the event Server Deregisters an Open ([MS-SRVS] section 3.1.6.5).

  • Enumerate all of the Search IDs (SID)s in the Server.Connection.SearchOpenTable that were opened by the PID indicated in the request header. For each SID:

    • The server MUST close the search indicated by the SID.

    • The server MUST invalidate the SID by removing the SearchOpen entry from Server.Connection.SearchOpenTable.

The server MUST search the Server.Connection.PendingRequestTable for any pending commands that have the same UID, TID, PID, and MID as presented in the request. If the SMB transport is connectionless, the header CID field value SHOULD<271> also be used. For each matching entry, the server MUST abort the pending operation. The client process that made the aborted command request no longer exists to receive the response.

If the Process Exit operation completes successfully, the server MUST construct an SMB_COM_PROCESS_EXIT response message as specified in section 2.2.4.18.2. The Status returned MUST indicate success. Otherwise, the server MUST send an error response.

The response MUST be sent to the client as specified in section 3.3.4.1.