Age | Commit message (Collapse) | Author |
|
expect into proper try handling), needs testing still
|
|
Replace parts of ffi module by libc functions ind sched.rs
Not exporting `CpuMask` anymore, should be the only API change of this PR. Since the type is not used in any other exported signature or type, I think it is fine to no longer export it.
r? @kamalmarhubi @posborne
|
|
|
|
Closes #408.
|
|
Add FcntlArg::F_FULLFSYNC
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
|
|
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
|
|
Implement `Clone` for `FdSet` on Mac/iOS
|
|
|
|
Get rid of a few warnings during compilation of tests
|
|
|
|
Update CHANGELOG for pull request 397
|
|
Fix nix on FreeBSD (rebased on master)
|
|
ci: fix docker container check
Newer version of docker no longer have the /.dockerinit file present
when the container is executing, so that is no longer an option.
When executing in a container, we do know that we will be executing
as pid 1 -- this is probably not ever the case on the host system.
r? @fiveop
|
|
Newer version of docker no longer have the /.dockerinit file present
when the container is executing, so that is no longer an option.
When executing in a container, we do know that we will be executing
as pid 1 -- this is probably not ever the case on the host system.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
On Linux, the cmsg_len field of struct cmsghdr has type size_t, but it
has size socklen_t on POSIX-compliant operating systems. So on
POSIX-compliant 64-bit operating systems, struct cmsghdr has padding
gaps that aren't present on Linux. Most of the issues fixed by this
commit related to those gaps.
src/sys/socket/ffi.rs
Fix the type of the cmsg_data field so the struct layout will be
correct.
src/sys/socket/mod.rs
In CmsgIterator.next, only return a single file descriptor.
sendmsg(2) can only stuff a single file descriptor into each
cmsg.
In cmsg_align, fix the rounding calculation, and eliminate a
division instruction.
Add a missing cmsg_align call in ControlMessage.len
In ControlMessage.encode_into, add any necessary padding bytes
between the cmsghdr and the data.
In sendmsg, fix some len<->capacity confusion.
|
|
Rules for generic types were located above rules for specific types, so the
rules for specific types never got matched. This caused the
sys::socket::sockopt::test::can_get_listen_on_tcp_socket test to fail on
FreeBSD. The solution is to put all of the generic rules at the bottom.
|
|
|
|
|
|
No longer support Rust 1.1
Since tempdir is broken on Rust 1.1 I propose to push the minimum supported Rust version to 1.2.
|
|
|
|
Introduce CHANGELOG.md
- Added initial CHANGELOG.md with Changes from Version 0.6.0 and the
upcoming changes for version 0.7.0.
- Added RELEASE_PROCEDURE.md detailing what changes should be made
to CHANGELOG.md during a release.
- Added sections about CHANGELOG.md in CONVENTIONS.md and
CONTRIBUTIONS.md.
|
|
- Added initial CHANGELOG.md with Changes from Version 0.6.0 and the
upcoming changes for version 0.7.0.
- Added RELEASE_PROCEDURE.md detailing what changes should be made
to CHANGELOG.md during a release.
- Added sections about CHANGELOG.md in CONVENTIONS.md and
CONTRIBUTIONS.md.
|
|
Fix NetBSD build
|
|
|
|
Add reboot() support on Linux
This adds support for calling [reboot(2)](http://linux.die.net/man/2/reboot) on Linux (useful for implementing PID 1!).
* **Testing**: I can't imagine how this could be tested other than manually, which is what I did to ensure it works.
* **libc**: for some reason libc includes neither `reboot()` function, nor `RB_*` constants, so I had to hack-define them here. Should I open a bug/PR against the libc crate?
* **API**: I went with `reboot()` function for restarting, powering off, halting, etc. and an additional `set_cad_enabled()` function for enabling/disabling Ctrl-Alt-Delete, which still corresponds to `reboot()` C call, but has different semantics and return type. (But I'm open to suggestions here -- maybe it would be better to separate each action into its own function, i.e. `restart()`, `poweroff()`, `halt()`?)
* **Documentation**: I see most of the things in nix are undocumented, so I didn't document anything except for the `set_cad_enabled()` function, which obviously uses a non-standard name.
* **Portability**: I implemented the Linux version as I'm not familiar with anything else, but there surely are others (ex. [BSD](http://www.freebsd.org/cgi/man.cgi?reboot(2))). If I didn't mess up anything, the new code is only compiled on Linux/Android, so it should be straightforward to implement the other versions too.
|
|
|
|
This reverts commit 012c6623c9c50aca91b81e6d30800613f515f898.
|
|
|
|
|
|
|
|
|
|
|
|
Force using the constants even on x86 where they do not fit into isize (c_int)
|
|
|
|
|
|
Publish docs to gh-pages, add coveralls, update README
See the commit messages for some additional details. This started out with just an update to publish the docs to gh-pages but snowballed into a few other changes along the way.
|
|
Use git master as libc version
As mentioned by @fiveop in #363,
> We should use the Github version of libc for development and a fixed version for releases.
So this changes the required libc version to GitHub's master.
The dependency is supposed to be manually changed to a fixed version when doing a release, out of the GitHub repository (i.e. nix's master always tracks libc's master).
|
|
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
This started out as a small change to update the readme
to include an updated pointer to the documentation on
gh-pages and ended with a bit of an overhaul in order
to provide better information for people just checking
out nix for the first time.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
This moves things around a fair bit in the .travis.yml to be
more logically ordered and adds support for publishing docs
(on master) to gh-pages. Code coverage is also calculated
and published to coveralls.io.
Travis is able to write to gh-pages on the github repository
via the GH_TOKEN environment variable stored in the travis
settings (marked as private). This token is generated from
the github user 'rust-nix-bot' in order to avoid given access
to other repos associated with an actual user's account (this
practice is recommended by Github).
Other changes worth noting:
- We now test fewer intermediate versions of rust
- The existing logic to publish to Carl's S3 bucket have been removed.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
eventfd: Follow nix conventions
This commit revamps to eventfd to follow nix conventions:
- drop in-crate FFI definitions
- rename EventFdFlag to EfdFlags
Additionally, it changes the initval argument to be a libc::c_uint,
matching the actual type.
|
|
This commit revamps to eventfd to follow nix conventions:
- drop in-crate FFI definitions
- rename EventFdFlag to EfdFlags
Additionally, it changes the initval argument to be a libc::c_uint,
matching the actual type.
|
|
Add missing wait flag WUNTRACED for non-Linux systems
My understanding is that this flag is required by POSIX, so all systems should allow for it
|
|
musl target needs std::mem now
Closes nix-rust/nix#325.
|
|
|
|
|
|
|
|
Provide accessors to sigmask of UContext.
|
|
Signal enum
This is work in progress. I post this pull request as a request for discussion. I mark the lines I have doubts or ideas about.
Ignore the first commit. It is the same as PR #361, which I wanted to base this change off.
|