wasmer_wasix/syscalls/journal/
clear_ethereal.rs1use super::*;
2
3impl<'a> JournalSyscallPlayer<'a, '_> {
4 pub(super) fn clear_ethereal(
5 &mut self,
6 mut differ_ethereal: Option<&mut Vec<JournalEntry<'a>>>,
7 ) {
8 tracing::trace!("Replay journal - ClearEthereal");
9 self.spawn_threads.clear();
10
11 if let Some(x) = self.stdout.as_mut() {
12 x.clear();
13 }
14 self.stdout_fds.clear();
15 self.stdout_fds.insert(1 as WasiFd);
16
17 if let Some(x) = self.stderr.as_mut() {
18 x.clear();
19 }
20 self.stderr_fds.clear();
21 self.stderr_fds.insert(2 as WasiFd);
22
23 differ_ethereal.iter_mut().for_each(|e| e.clear());
24 self.staged_differ_memory.clear();
25 }
26}