Adapted old code to fit new codebase
This commit is contained in:
10
src/jobs.rs
10
src/jobs.rs
@@ -76,6 +76,7 @@ impl<'a> ChildProc {
|
||||
if let Some(pgid) = pgid {
|
||||
child.set_pgid(pgid).ok();
|
||||
}
|
||||
flog!(TRACE, "new child: {:?}", child);
|
||||
Ok(child)
|
||||
}
|
||||
pub fn pid(&self) -> Pid {
|
||||
@@ -149,6 +150,12 @@ impl JobBldr {
|
||||
children: self.children
|
||||
}
|
||||
}
|
||||
pub fn set_pgid(&mut self, pgid: Pid) {
|
||||
self.pgid = Some(pgid);
|
||||
}
|
||||
pub fn pgid(&self) -> Option<Pid> {
|
||||
self.pgid
|
||||
}
|
||||
pub fn with_children(self, children: Vec<ChildProc>) -> Self {
|
||||
Self {
|
||||
table_id: self.table_id,
|
||||
@@ -156,6 +163,9 @@ impl JobBldr {
|
||||
children
|
||||
}
|
||||
}
|
||||
pub fn push_child(&mut self, child: ChildProc) {
|
||||
self.children.push(child);
|
||||
}
|
||||
pub fn build(self) -> Job {
|
||||
Job {
|
||||
table_id: self.table_id,
|
||||
|
||||
Reference in New Issue
Block a user