Jeremy Soller
1d0bba8224
Move stdout/err flush into sys
2016-11-28 18:25:47 -07:00
Jeremy Soller
2ec21327f2
Switch to using Prefix::Verbatim
2016-11-28 18:19:17 -07:00
Jeremy Soller
746222fd9d
Switch to using syscall crate directly - without import
2016-11-28 18:07:19 -07:00
Jeremy Soller
d73d32f58d
Fix canonicalize
2016-11-25 19:53:21 -07:00
Jeremy Soller
3a1bb2ba26
Use O_DIRECTORY
2016-11-25 18:23:19 -07:00
Theodore DeRego
5c1c48532f
Separated fuchsia-specific process stuff into 'process_fuchsia.rs' and refactored out some now-duplicated code into a 'process_common.rs'
2016-11-23 13:58:13 -08:00
Jeremy Soller
6733074c84
Allow setting nonblock on sockets
2016-11-23 14:22:39 -07:00
Jeremy Soller
4a0bc71bb7
Add File set_permissions
2016-11-23 08:24:49 -07:00
Jeremy Soller
b3c91dfb6a
Merge branch 'master' into redox
2016-11-23 08:21:15 -07:00
Theodore DeRego
fae86b92de
Cleaned up and appeased the linter
2016-11-22 16:08:48 -08:00
Theodore DeRego
5c23f2e3c8
Fuchsia support for std::process via liblaunchpad.
2016-11-22 12:12:46 -08:00
Steven Allen
1aaca5f290
Add a method for setting permissions directly on an open file.
...
On unix like systems, the underlying file corresponding to any given path may
change at any time. This function makes it possible to set the permissions of
the a file corresponding to a `File` object even if its path changes.
2016-11-22 08:42:28 -08:00
bors
7b3eeea22c
Auto merge of #37677 - jsen-:master, r=alexcrichton
...
libstd: support creation of anonymous pipe on WinXP/2K3
`PIPE_REJECT_REMOTE_CLIENTS` flag is not supported on Windows < VISTA, and every invocation of `anon_pipe` including attempts to pipe `std::process::Child`'s stdio fails.
This PR should work around this issue by performing a runtime check of windows version and conditionally omitting this flag on "XP and friends".
Getting the version should be probably moved out of the function `anon_pipe` itself (the OS version does not often change during runtime :) ), but:
- I didn't find any precedent for this and assuming there's not much overhead (I hope windows does not perform any heuristics to find out it's own version, just fills couple of fields in the struct).
- the code path is not especially performance sensitive anyway.
2016-11-21 14:37:24 -06:00
jsen-
fc5a361c84
support creation of anonymous pipe on WinXP/2K3
2016-11-20 22:13:01 +01:00
Jeremy Soller
2556400a5d
Replace setuid, setgid with setreuid, setregid
2016-11-17 14:15:58 -07:00
Jeremy Soller
f01add1a3b
Add signal support, better exec error handling
2016-11-17 10:22:07 -07:00
Jeremy Soller
267bc54fbd
Use chmod instead of fcntl to change file perms
2016-11-15 17:07:55 -07:00
Jeremy Soller
2e5c821619
Add set_perm
2016-11-15 16:12:30 -07:00
Jeremy Soller
73f24d47de
Simple implementation of read2
2016-11-14 20:56:06 -07:00
Jeremy Soller
de68aced95
Add current_exe support
2016-11-14 19:08:48 -07:00
Jeremy Soller
18bf0540bf
Fix redox prefix handling
2016-11-14 15:02:18 -07:00
Jeremy Soller
a0b5dfef2a
Add fcntl
2016-11-14 12:15:11 -07:00
Jeremy Soller
0bb9a95907
Merge branch 'master' into redox
2016-11-10 20:37:34 -07:00
Jeremy Soller
25e1a4a008
Use target_os = redox for cfg
2016-11-10 20:13:14 -07:00
Jeremy Soller
79a8c272fb
Fix readdir
2016-11-10 19:58:19 -07:00
Jeremy Soller
a90850995f
Fixes for stdio and processes on Redox
2016-11-10 19:33:59 -07:00
Jeremy Soller
ced32a08f3
Fix exec
2016-11-09 20:52:30 -07:00
Tshepang Lekhonkhobe
a9349d723d
doc: fix typos
2016-11-10 05:23:41 +02:00
Raph Levien
fe953dc16e
std: Track change to cprng syscall signature (Fuchsia)
...
The mx_cprng_draw syscall has changed signature to separate the status
and size return values, rather than multiplexing them into a single
value with errors interpreted as a negative value. This patch tracks
that change.
2016-11-04 13:04:27 -07:00
Jeremy Soller
01e8378070
Update to new sys requirements
2016-11-03 08:58:01 -06:00
Jeremy Soller
74dc845c2d
Merge branch 'master' into redox
2016-11-03 08:52:48 -06:00
Brian Anderson
ee71dc5476
Document sys_common and sys
2016-11-01 17:08:24 +00:00
Brian Anderson
ca30691813
std: Move sys_common to libstd/sys_common
...
Make the directory structure reflect the module structure. I've always
found the existing structure confusing.
2016-11-01 17:08:24 +00:00
Brian Anderson
f3a709dc52
std: Move platform-specific out of sys_common::util
2016-11-01 17:08:24 +00:00
Brian Anderson
219c018894
std: Move platform-specific code out of libstd/lib.rs
2016-11-01 17:08:24 +00:00
Brian Anderson
6d54cd4b2c
std: Move a plattform-specific constant to sys::stdio
2016-11-01 17:08:24 +00:00
Brian Anderson
568840707c
std: Move elf TLS to sys::fast_thread_local
2016-11-01 17:08:24 +00:00
Jeremy Soller
123d08b3d3
Merge branch 'master' of https://github.com/rust-lang/rust into redox
2016-10-31 09:40:24 -06:00
Jeremy Soller
c77979b419
Fix for thread locals
2016-10-30 18:35:19 -06:00
Jeremy Soller
4edcddfb61
Implement TLS scoped keys, compiler builtins
2016-10-30 16:14:47 -06:00
Jeremy Soller
37bfef023d
Implement thread
2016-10-30 09:36:04 -06:00
Jeremy Soller
ea6f5aa1b1
Implement rand and args, cleanup other modules
2016-10-29 21:46:49 -06:00
Jeremy Soller
b1b35dd1f2
Implement env, reentrant mutex, and partially implement scoped thread locals. Better error messages for unsupported features
2016-10-29 21:15:32 -06:00
bors
17e9d9ae82
Auto merge of #37385 - raphlinus:fuchsia_random, r=alexcrichton
...
Add support for kernel randomness for Fuchsia
Wire up cprng syscall as provider for rand::os::OsRng on Fuchsia.
2016-10-28 21:31:26 -07:00
Jeremy Soller
a5de9bb591
Remove unsafe libc layer
2016-10-28 14:17:34 -06:00
Jeremy Soller
8b09e01fef
Add redox system
2016-10-27 20:57:49 -06:00
Raph Levien
592d7bfb3a
Add support for kernel randomness for Fuchsia
...
Wire up cprng syscall as provider for rand::os::OsRng on Fuchsia.
2016-10-24 16:48:45 -07:00
Raph Levien
69d7884a1d
Fix tidy warning
...
Prefer FIXME to TODO
2016-10-22 07:08:07 -07:00
Raph Levien
773a5f59e9
Fix missing DirEntryExt::ino
...
The DirEntryExt::ino() implementation was omitted from the first
iteration of this patch, because a dependency needed to be
configured. The fix is straightforward enough.
2016-10-22 07:08:07 -07:00
Raph Levien
76bac5d33e
Add Fuchsia support
...
Adds support for the x86_64-unknown-fuchsia target, which covers the
Fuchsia operating system.
2016-10-22 07:08:06 -07:00