@@ -21,7 +21,7 @@ use crate::io;
21
21
use crate :: pid:: RawPid ;
22
22
use crate :: process:: {
23
23
Cpuid , MembarrierCommand , MembarrierQuery , Pid , PidfdFlags , PidfdGetfdFlags , Resource , Rlimit ,
24
- Uid , WaitId , WaitOptions , WaitStatus , WaitidOptions , WaitidStatus ,
24
+ Uid , WaitId , WaitIdOptions , WaitIdStatus , WaitOptions , WaitStatus ,
25
25
} ;
26
26
use crate :: signal:: Signal ;
27
27
use crate :: utils:: as_mut_ptr;
@@ -414,7 +414,7 @@ pub(crate) fn _waitpid(
414
414
}
415
415
416
416
#[ inline]
417
- pub ( crate ) fn waitid ( id : WaitId < ' _ > , options : WaitidOptions ) -> io:: Result < Option < WaitidStatus > > {
417
+ pub ( crate ) fn waitid ( id : WaitId < ' _ > , options : WaitIdOptions ) -> io:: Result < Option < WaitIdStatus > > {
418
418
// Get the id to wait on.
419
419
match id {
420
420
WaitId :: All => _waitid_all ( options) ,
@@ -425,7 +425,7 @@ pub(crate) fn waitid(id: WaitId<'_>, options: WaitidOptions) -> io::Result<Optio
425
425
}
426
426
427
427
#[ inline]
428
- fn _waitid_all ( options : WaitidOptions ) -> io:: Result < Option < WaitidStatus > > {
428
+ fn _waitid_all ( options : WaitIdOptions ) -> io:: Result < Option < WaitIdStatus > > {
429
429
// `waitid` can return successfully without initializing the struct (no
430
430
// children found when using `WNOHANG`)
431
431
let mut status = MaybeUninit :: < c:: siginfo_t > :: zeroed ( ) ;
@@ -444,7 +444,7 @@ fn _waitid_all(options: WaitidOptions) -> io::Result<Option<WaitidStatus>> {
444
444
}
445
445
446
446
#[ inline]
447
- fn _waitid_pid ( pid : Pid , options : WaitidOptions ) -> io:: Result < Option < WaitidStatus > > {
447
+ fn _waitid_pid ( pid : Pid , options : WaitIdOptions ) -> io:: Result < Option < WaitIdStatus > > {
448
448
// `waitid` can return successfully without initializing the struct (no
449
449
// children found when using `WNOHANG`)
450
450
let mut status = MaybeUninit :: < c:: siginfo_t > :: zeroed ( ) ;
@@ -463,7 +463,7 @@ fn _waitid_pid(pid: Pid, options: WaitidOptions) -> io::Result<Option<WaitidStat
463
463
}
464
464
465
465
#[ inline]
466
- fn _waitid_pgid ( pgid : Option < Pid > , options : WaitidOptions ) -> io:: Result < Option < WaitidStatus > > {
466
+ fn _waitid_pgid ( pgid : Option < Pid > , options : WaitIdOptions ) -> io:: Result < Option < WaitIdStatus > > {
467
467
// `waitid` can return successfully without initializing the struct (no
468
468
// children found when using `WNOHANG`)
469
469
let mut status = MaybeUninit :: < c:: siginfo_t > :: zeroed ( ) ;
@@ -482,7 +482,7 @@ fn _waitid_pgid(pgid: Option<Pid>, options: WaitidOptions) -> io::Result<Option<
482
482
}
483
483
484
484
#[ inline]
485
- fn _waitid_pidfd ( fd : BorrowedFd < ' _ > , options : WaitidOptions ) -> io:: Result < Option < WaitidStatus > > {
485
+ fn _waitid_pidfd ( fd : BorrowedFd < ' _ > , options : WaitIdOptions ) -> io:: Result < Option < WaitIdStatus > > {
486
486
// `waitid` can return successfully without initializing the struct (no
487
487
// children found when using `WNOHANG`)
488
488
let mut status = MaybeUninit :: < c:: siginfo_t > :: zeroed ( ) ;
@@ -500,20 +500,20 @@ fn _waitid_pidfd(fd: BorrowedFd<'_>, options: WaitidOptions) -> io::Result<Optio
500
500
Ok ( unsafe { cvt_waitid_status ( status) } )
501
501
}
502
502
503
- /// Convert a `siginfo_t` to a `WaitidStatus `.
503
+ /// Convert a `siginfo_t` to a `WaitIdStatus `.
504
504
///
505
505
/// # Safety
506
506
///
507
507
/// The caller must ensure that `status` is initialized and that `waitid`
508
508
/// returned successfully.
509
509
#[ inline]
510
510
#[ rustfmt:: skip]
511
- unsafe fn cvt_waitid_status ( status : MaybeUninit < c:: siginfo_t > ) -> Option < WaitidStatus > {
511
+ unsafe fn cvt_waitid_status ( status : MaybeUninit < c:: siginfo_t > ) -> Option < WaitIdStatus > {
512
512
let status = status. assume_init ( ) ;
513
513
if status. __bindgen_anon_1 . __bindgen_anon_1 . _sifields . _sigchld . _pid == 0 {
514
514
None
515
515
} else {
516
- Some ( WaitidStatus ( status) )
516
+ Some ( WaitIdStatus ( status) )
517
517
}
518
518
}
519
519
0 commit comments