duct
a library for running child processes
1.1.1
36M downloads/mo
#1498 most downloaded on crates.io
oconnor663/duct.rs
What this package is like to depend on
Last release 9 months ago
09 Nov 2025
Release timing varies
gaps range from 3 weeks to 1.8 years
Some releases are documented
notes for 10 of 28 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
28 releases · first in 2016
1 release in the last 12 months
see the full history below
Release timeline
28 releases · Feb 2016 to Nov 2025Releases
latest 28-
1.1.109 Nov 2025Release notes
Open source →Changes since 1.1.0:
- Duct now uses a global
Mutexto prevent pipe inheritance bugs caused
by the lack ofpipe2on macOS. (The Python version of Duct relies on
close_fds=Trueinstead, but the Rust standard library has no
equivalent.)
- Duct now uses a global
-
1.1.003 Aug 2025Release notes
Open source →Changes since 1.0.0:
- Added the
Handle::wait_timeoutandHandle::wait_deadlinemethods.
These are gated by thetimeoutfeature, which is enabled by default.
Windows supports these timeouts natively, but on Unix this requires
handlingSIGCHLD. - Fixed a bug with setting or removing non-uppercase env var names on
Windows. Duct previously uppercased all env var names passed to its
API, but not names coming from the system environment, which caused
mismatches. See #119.
Contributed by @Wazzaps.
- Added the
-
1.0.007 May 2025Release notes
Open source →Changes since 0.13.7:
- The API is stabilized as-is, and most callers won't need to make any
changes. - Fixed a bug where
Handle::try_waitcould block indefinitely if a
child process had exited but a longer-lived grandchild process was
keeping its IO pipes open and its IO threads running (i.e.
stdin_bytes,stdout_capture, orstderr_capture). Commit 04c2c8c. Handlenow does lazy cleanup of leaked zombie children. If a child
has not exited by the time itsHandleis dropped, that child gets
added to a global list. Whenever any Duct function is about to spawn a
new child, it polls each child in the leaked list and cleans up any
that have exited. This strategy is copied from Python'ssubprocess
module.ReaderHandlecontains aHandleinternally and does the
same cleanup.- With that new cleanup mechanism in place,
Handle::killand
ReaderHandle::killno longer wait on child processes to exit. This
avoids obscure edge cases (FUSE filesystems, debugger pauses) where
waiting afterSIGKILLcould still block indefinitely. - Duct no longer kills your child processes in any circumstance other
than when you call.kill(). Previously Duct would kill child
processes when dropping aReaderHandle, or in rare pipe spawning
error cases.
- The API is stabilized as-is, and most callers won't need to make any
-
0.13.722 Dec 2023Release notes
Open source →Changes since 0.13.6:
- Avoid unnecessarily dup'ing standard file descriptors. This unbreaks
some use cases where those descriptors might not exist at all, like
Windows services. See #99.
- Avoid unnecessarily dup'ing standard file descriptors. This unbreaks
-
0.13.629 Nov 2022 -
0.13.504 Feb 2021 -
0.13.413 Apr 2020Release notes
Open source →Changes since 0.13.3:
- The
duct_shcrate is now versioned in lockstep withduct. - Doc changes.
- The
-
0.13.330 Oct 2019 -
0.13.215 Oct 2019Release notes
Open source →Changes since 0.13.1:
- Added
ReaderHandle::try_wait. - Debug output for
Expressionis more concise.
- Added
-
0.13.112 Oct 2019Release notes
Open source →Changes since 0.13.0:
- ReaderHandle now supports kill().
- Kill methods no longer wait on IO threads to complete. This avoids
blocking on unkilled grandchildren.
-
0.13.022 Sep 2019Nothing published for this version
-
0.12.015 Feb 2019Nothing published for this version
-
0.11.120 Sep 2018Nothing published for this version
-
0.11.005 Jul 2018Nothing published for this version
-
0.10.012 Feb 2018Nothing published for this version
-
0.9.216 Oct 2017Nothing published for this version
-
0.9.105 Jun 2017Nothing published for this version
-
0.9.030 May 2017Nothing published for this version
-
0.8.227 Mar 2017Nothing published for this version
-
0.8.124 Mar 2017Nothing published for this version
-
0.8.023 Mar 2017Nothing published for this version
-
0.7.006 Feb 2017Nothing published for this version
-
0.6.026 Jan 2017Nothing published for this version
-
0.5.129 Dec 2016Nothing published for this version
-
0.5.024 Dec 2016Nothing published for this version
-
0.4.026 Jun 2016Nothing published for this version
-
0.2.026 Apr 2016Nothing published for this version
-
0.1.020 Feb 2016Nothing published for this version