mirror of
https://github.com/apple/container.git
synced 2026-09-12 02:35:42 +00:00
LinuxContainer: Add ability to close stdin (#201)
This allows the user the ability to raise an EOF for the containers stdin. Today there's no way to close stdin so something as simple as "cat" and relying on EOF to move the process forward doesn't work
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import ContainerizationError
|
||||
import ContainerizationOCI
|
||||
import Foundation
|
||||
|
||||
@@ -51,6 +52,7 @@ public protocol VirtualMachineAgent: Sendable {
|
||||
func resizeProcess(id: String, containerID: String?, columns: UInt32, rows: UInt32) async throws
|
||||
func waitProcess(id: String, containerID: String?, timeoutInSeconds: Int64?) async throws -> Int32
|
||||
func deleteProcess(id: String, containerID: String?) async throws
|
||||
func closeProcessStdin(id: String, containerID: String?) async throws
|
||||
|
||||
// Networking
|
||||
func up(name: String, mtu: UInt32?) async throws
|
||||
@@ -59,3 +61,9 @@ public protocol VirtualMachineAgent: Sendable {
|
||||
func routeAddDefault(name: String, gateway: String) async throws
|
||||
func configureDNS(config: DNS, location: String) async throws
|
||||
}
|
||||
|
||||
extension VirtualMachineAgent {
|
||||
public func closeProcessStdin(id: String, containerID: String?) async throws {
|
||||
throw ContainerizationError(.unsupported, message: "closeProcessStdin")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user