yash-env-0.3.0
magicant
released this
22 Aug 15:09
·
81 commits
to master
since this release
[0.3.0] - 2024-08-22
Added
- This crate now builds on non-Unix platforms. However,
system::real::RealSystem
is only available on Unix platforms. - The
OfdAccess
,OpenFlag
,FdFlag
,Mode
,RawMode
,Uid
,RawUid
,
Gid
,RawGid
,FileType
,Stat
, andSigmaskOp
types in thesystem
module - The
System
trait now has theofd_access
,get_and_set_nonblocking
,
getuid
,geteuid
,getgid
, andgetegid
methods. Mode
has been moved fromsystem::virtual
tosystem
and now has constants
with more human-friendly names, e.g.,USER_READ
andGROUP_WRITE
.- The
system::virtual::Inode
struct now has thestat
method. - The
system::virtual::FileBody
struct now has thetype
andsize
methods. - The
system::virtual::Process
struct now has the getters/setters for the
real/effective user/group IDs:uid
,set_uid
,euid
,set_euid
,gid
,
set_gid
,egid
, andset_egid
. system::virtual::VirtualSystem::open
now applies the process's umask to the
mode argument.- The
job::RawPid
type has been added to represent the contents ofjob::Pid
. - The
stack::Frame
enum now has theInitFile
variant. - The crate now re-exports
unix_path
aspath
andunix_str
asstr
. - External dependencies:
- enumset 1.1.2 (previously an internal dependency)
- unix_path 1.0.1
- unix_str 1.0.0
- Internal dependencies:
- bitflags 2.6.0
- nix 0.29.0 (with the "fs", "signal", and "user" features enabled)
Changed
system::FdFlag
is no longer a re-export ofnix::fcntl::FdFlag
.system::Mode
is no longer a re-export ofnix::sys::stat::Mode
.- All APIs that handle
std::path::Path
,std::path::PathBuf
,std::ffi::OsStr
,
andstd::ffi::OsString
now usepath::Path
,path::PathBuf
,str::OsStr
,
andstr::OsString
instead.system::DirEntry::name
system::System::confstr_path
system::System::getcwd
system::System::getpwnam_dir
system::System::open_tmpfile
system::virtual::FileBody::Directory::files
system::virtual::FileBody::Symlink::target
system::virtual::FileSystem::get
system::virtual::FileSystem::save
system::virtual::Process::chdir
system::virtual::SystemState::home_dirs
system::virtual::SystemState::path
system::virtual::VirtualDir::new
system::SignalHandling
has been renamed tosystem::Disposition
.- In the
system::virtual::Process
struct, the following methods have been
renamed:signal_handling
→disposition
set_signal_handling
→set_disposition
- In the
trap::SignalSystem
trait, theset_signal_handling
method has been
renamed toset_disposition
. - In the
trap::TrapSet
struct, the following methods have been renamed:enable_sigchld_handler
→enable_internal_disposition_for_sigchld
enable_terminator_handlers
→enable_internal_dispositions_for_terminators
enable_stopper_handlers
→enable_internal_dispositions_for_stoppers
disable_terminator_handlers
→disable_internal_dispositions_for_terminators
disable_stopper_handlers
→disable_internal_dispositions_for_stoppers
disable_internal_handlers
→disable_internal_dispositions
- The
fstat
andfstatat
methods ofsystem::System
now return aStat
instead of anix::sys::stat::FileStat
. - The
system::System::fstatat
method now takes afollow_symlinks: bool
parameter instead of anAtFlags
parameter. - The
system::System::open
method has been redefined to takeOfdAccess
and
OpenFlag
parameters instead ofnix::fcntl::OFlag
. - The
system::System::isatty
method now returns abool
instead of a
system::Result<bool>
. - The
system::System::umask
method now takes and returns a value of the new
system::Mode
type. - The
system::System::sigmask
method now takes aSigmaskOp
parameter instead
of anix::sys::signal::SigmaskHow
parameter. - The
system::System::select
method now takesVec<io::Fd>
parameters instead
offd_set::FdSet
parameters. It also takes aDuration
instead of a
nix::sys::time::TimeSpec
for the optional timeout parameter. - The
dup
,fcntl_getfl
, andfcntl_setfl
methods ofsystem::System
now
operate on anEnumSet<FdFlag>
parameter instead of annix::fcntl::FdFlag
parameter. - The
getrlimit
andsetrlimit
methods ofsystem::System
now returns an
error of typesystem::Errno
instead ofstd::io::Error
. - In the
system::resource
module:- The
rlim_t
type has been renamed toLimit
. - The
RLIM_INFINITY
constant has been renamed toINFINITY
.
- The
- The
flags: enumset::EnumSet<FdFlag>
field of
yash_env::system::virtual::FdBody
has replaced
theflag: nix::fcntl::FdFlag
field. - The
system::virtual::INode
struct has been renamed toInode
. - The
system::virtual::OpenFileDescription::i_node
method has been renamed to
inode
and now returns a reference toRc<RefCell<Inode>>
rather than a
clone of it. - The
system::virtual::OpenFileDescription::seek
method now takes a
std::io::SeekFrom
parameter instead of an offset and whence pair. - The
system::virtual::VirtualSystem::select
method now treats as ready file
descriptors that are contained inreaders
but not readable, or inwriters
but not writable. Previously, the method returned anEBADF
error in these
cases. - External dependency versions:
- Rust 1.77.0 → 1.79.0
- yash-syntax 0.10.0 → 0.11.0
Deprecated
system::virtual::Mode
in favor ofsystem::Mode
Removed
- The
system
module no longer reexportsnix::fcntl::AtFlags
,
nix::fcntl::OFlag
,nix::sys::stat::FileStat
,nix::sys::stat::SFlag
,
nix::sys::signal::SigmaskHow
, andnix::sys::time::TimeSpec
. - The
fcntl_getfl
andfcntl_setfl
methods from theSystem
trait - The
system::Errno
struct'slast
andclear
methods are no longer public. - The
system::resource::Resource::as_raw_type
method is no longer public. - All the fields of the
system::virtual::OpenFileDescription
struct are now
private. - The
system::fd_set
module impl TryFrom<semantics::ExitStatus> for nix::sys::signal::Signal
impl From<job::Pid> for nix::unistd::Pid
impl From<nix::unistd::Pid> for job::Pid
impl From<system::resource::LimitPair> for nix::libc::rlimit
impl From<nix::libc::rlimit> for system::resource::LimitPair
- External dependencies:
- nix 0.27.0 (now an internal dependency with the "fs", "signal" and "user"
features enabled)
- nix 0.27.0 (now an internal dependency with the "fs", "signal" and "user"