rust/src/librustuv
Aaron Turon 046062d3bf Process::new etc should support non-utf8 commands/args
The existing APIs for spawning processes took strings for the command
and arguments, but the underlying system may not impose utf8 encoding,
so this is overly limiting.

The assumption we actually want to make is just that the command and
arguments are viewable as [u8] slices with no interior NULLs, i.e., as
CStrings. The ToCStr trait is a handy bound for types that meet this
requirement (such as &str and Path).

However, since the commands and arguments are often a mixture of
strings and paths, it would be inconvenient to take a slice with a
single T: ToCStr bound. So this patch revamps the process creation API
to instead use a builder-style interface, called `Command`, allowing
arguments to be added one at a time with differing ToCStr
implementations for each.

The initial cut of the builder API has some drawbacks that can be
addressed once issue #13851 (libstd as a facade) is closed. These are
detailed as FIXMEs.

Closes #11650.

[breaking-change]
2014-05-14 22:52:31 -07:00
..
access.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
addrinfo.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
async.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
file.rs Add stat method to std::io::fs::File to stat without a Path. 2014-05-12 19:52:29 -07:00
homing.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
idle.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
lib.rs Add the patch number to version strings. Closes #13289 2014-05-12 19:52:29 -07:00
macros.rs Fixed Win64 build 2014-04-22 18:08:06 -07:00
net.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
pipe.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
process.rs Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
queue.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
rc.rs rustuv: Switch field privacy as necessary 2014-03-31 15:47:36 -07:00
signal.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
stream.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
timeout.rs core: Remove the cast module 2014-05-11 01:13:02 -07:00
timer.rs rustuv: Implement timeouts for unix networking 2014-05-07 23:29:04 -07:00
tty.rs rustuv: Implement timeouts for unix networking 2014-05-07 23:29:04 -07:00
uvio.rs Process::new etc should support non-utf8 commands/args 2014-05-14 22:52:31 -07:00
uvll.rs rename global_heap -> libc_heap 2014-05-10 19:58:18 -04:00