Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port tokio to qnx #6529

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tokio/src/net/unix/ucred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub(crate) use self::impl_solaris::get_peer_cred;
#[cfg(target_os = "aix")]
pub(crate) use self::impl_aix::get_peer_cred;

#[cfg(any(target_os = "espidf", target_os = "vita"))]
#[cfg(any(target_os = "espidf", target_os = "vita", target_os = "nto"))]
pub(crate) use self::impl_noproc::get_peer_cred;

#[cfg(any(
Expand Down Expand Up @@ -307,7 +307,7 @@ pub(crate) mod impl_aix {
}
}

#[cfg(any(target_os = "espidf", target_os = "vita"))]
#[cfg(any(target_os = "espidf", target_os = "vita", target_os = "nto"))]
pub(crate) mod impl_noproc {
use crate::net::unix::UnixStream;
use std::io;
Expand Down
21 changes: 18 additions & 3 deletions tokio/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,14 @@ impl Command {
/// Sets the child process's user ID. This translates to a
/// `setuid` call in the child process. Failure in the `setuid`
/// call will cause the spawn to fail.
#[cfg(unix)]
#[cfg(target_os = "nto")]
pub fn uid(&mut self, id: u32) -> &mut Command {
let signed_id = id as i32;
self.std.uid(signed_id);
self
}

#[cfg(all(unix, not(target_os = "nto")))]
#[cfg_attr(docsrs, doc(cfg(unix)))]
pub fn uid(&mut self, id: u32) -> &mut Command {
self.std.uid(id);
Expand All @@ -678,10 +685,18 @@ impl Command {

/// Similar to `uid` but sets the group ID of the child process. This has
/// the same semantics as the `uid` field.
#[cfg(unix)]
#[cfg(target_os = "nto")]
pub fn gid(&mut self, id: u32) -> &mut Command {
let signed_gid = id as i32;
self.std.gid(signed_gid);
self
}

#[cfg(all(unix, not(target_os = "nto")))]
#[cfg_attr(docsrs, doc(cfg(unix)))]
pub fn gid(&mut self, id: u32) -> &mut Command {
self.std.gid(id);
let signed_gid = id as i32;
self.std.gid(signed_gid);
self
}

Expand Down
Loading