Skip to content

Commit 0036723

Browse files
committed
Add a debug log
1 parent 16fd25f commit 0036723

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/ProcessInvocation/ProcessInvocation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ public struct ProcessInvocation : AsyncSequence {
709709
Conf.logger?.debug("Called in termination handler of process.")
710710
if let fgPgIDSetInfo = fgPgIDSetInfo {
711711
/* Let’s revert the fg pg ID back to the original value. */
712+
Conf.logger?.debug("Setting pgrp of input fd back to original value.", metadata: ["fd": "\(fgPgIDSetInfo.destFd)", "value": "\(fgPgIDSetInfo.originalValue)"])
712713
if tcsetpgrp(fgPgIDSetInfo.destFd.rawValue, fgPgIDSetInfo.originalValue) != 0 && errno != ENOTTY {
713714
Conf.logger?.error("Failed setting foreground process group ID of controlling terminal of redirected stdin back to the original value.")
714715
}

0 commit comments

Comments
 (0)