Skip to content

Commit

Permalink
refactor(signal): remove SigDetails::CHLD
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenRuiwei committed Jul 26, 2024
1 parent 2c6afab commit 43d4b8a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
7 changes: 1 addition & 6 deletions kernel/src/task/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,7 @@ impl Task {
SigInfo {
sig: Sig::SIGCHLD,
code,
details: SigDetails::CHLD {
pid: self.pid(),
status: signum.raw() as i32 & 0x7F,
utime: self.time_stat().user_time(),
stime: self.time_stat().sys_time(),
},
details: SigDetails::None,
},
false,
);
Expand Down
14 changes: 2 additions & 12 deletions kernel/src/task/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,7 @@ impl Task {
SigInfo {
sig: Sig::SIGCHLD,
code: SigInfo::CLD_EXITED,
details: SigDetails::CHLD {
pid: c.pid(),
status: c.exit_code(),
utime: c.time_stat().user_time(),
stime: c.time_stat().sys_time(),
},
details: SigDetails::None,
},
false,
)
Expand All @@ -617,12 +612,7 @@ impl Task {
SigInfo {
sig: Sig::SIGCHLD,
code: SigInfo::CLD_EXITED,
details: SigDetails::CHLD {
pid: self.pid(),
status: self.exit_code(),
utime: self.time_stat().user_time(),
stime: self.time_stat().sys_time(),
},
details: SigDetails::None,
},
false,
);
Expand Down
8 changes: 0 additions & 8 deletions modules/signal/src/siginfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ pub enum SigDetails {
/// sender's pid
pid: usize,
},
CHLD {
/// which child
pid: usize,
/// exit code
status: i32,
utime: Duration,
stime: Duration,
},
}

#[allow(unused)]
Expand Down

0 comments on commit 43d4b8a

Please sign in to comment.