tag | d1805e19ac070c172b048db44ccd2f85dd7dd011 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Thu Jan 04 16:56:07 2024 -0800 |
object | cf3018d45e97fad3df6a053ccce41b12330d4c9a |
frc_340819010 (10586669,com.google.android.adbd,com.google.android.adservices,com.google.android.appsearch,com.google.android.captiveportallogin,com.google.android.configinfrastructure,com.google.android.conscrypt,com.google.android.documentsui,com.google.android.ext.services,com.google.android.extservices,com.google.android.go.adbd,com.google.android.go.adservices,com.google.android.go.appsearch,com.google.android.go.captiveportallogin,com.google.android.go.configinfrastructure,com.google.android.go.conscrypt,com.google.android.go.documentsui,com.google.android.go.extservices,com.google.android.go.ipsec,com.google.android.go.mediaprovider,com.google.android.go.networkstack,com.google.android.go.neuralnetworks,com.google.android.go.ondevicepersonalization,com.google.android.go.os.statsd,com.google.android.go.resolv,com.google.android.go.rkpd,com.google.android.go.scheduling,com.google.android.go.sdkext,com.google.android.go.tethering,com.google.android.go.tzdata5,com.google.android.go.uwb,com.google.android.go.wifi,com.google.android.ipsec,com.google.android.networkstack,com.google.android.neuralnetworks,com.google.android.ondevicepersonalization,com.google.android.os.statsd,com.google.android.resolv,com.google.android.rkpd,com.google.android.scheduling,com.google.android.sdkext,com.google.android.tethering,com.google.android.tzdata5,com.google.android.uwb,com.google.android.wifi)
commit | cf3018d45e97fad3df6a053ccce41b12330d4c9a | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 11 17:58:04 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Apr 11 17:58:04 2023 +0000 |
tree | 11e18b4dd80bdcc297ab5c3bcea47ba342ca555d | |
parent | 6a3d911a9c9261588539b23ad4408e0f17ba5b05 [diff] | |
parent | b5ba215692fc0a636d24a01516d467df2d986a36 [diff] |
Snap for 9912757 from b5ba215692fc0a636d24a01516d467df2d986a36 to aml-frc-release Change-Id: I4e3096dc4b62287cee5a9e92eea94753ee8a91a6
A library for passing arbitrary file descriptors when spawning child processes.
use command_fds::{CommandFdExt, FdMapping}; use std::fs::File; use std::os::unix::io::AsRawFd; use std::process::Command; // Open a file. let file = File::open("Cargo.toml").unwrap(); // Prepare to run `ls -l /proc/self/fd` with some FDs mapped. let mut command = Command::new("ls"); command.arg("-l").arg("/proc/self/fd"); command .fd_mappings(vec![ // Map `file` as FD 3 in the child process. FdMapping { parent_fd: file.as_raw_fd(), child_fd: 3, }, // Map this process's stdin as FD 5 in the child process. FdMapping { parent_fd: 0, child_fd: 5, }, ]) .unwrap(); // Spawn the child process. let mut child = command.spawn().unwrap(); child.wait().unwrap();
Licensed under the Apache License, Version 2.0.
If you want to contribute to the project, see details of how we accept contributions.