mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 06:52:13 +00:00
Revert "agent: fix the issue of exec hang with a backgroud process"
This reverts commit 25d2fb0fde
.
The reason we're reverting the commit is because it to check whether
it's the cause for the regression on devmapper tests.
Fixes: #7253
Depends-on: github.com/kata-containers/tests#5705
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
b7c58320a5
commit
275c84e7b5
@ -161,7 +161,7 @@ impl Process {
|
|||||||
|
|
||||||
pub fn notify_term_close(&mut self) {
|
pub fn notify_term_close(&mut self) {
|
||||||
let notify = self.term_exit_notifier.clone();
|
let notify = self.term_exit_notifier.clone();
|
||||||
notify.notify_waiters();
|
notify.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn close_stdin(&mut self) {
|
pub fn close_stdin(&mut self) {
|
||||||
|
@ -595,16 +595,15 @@ impl AgentService {
|
|||||||
let cid = req.container_id;
|
let cid = req.container_id;
|
||||||
let eid = req.exec_id;
|
let eid = req.exec_id;
|
||||||
|
|
||||||
let term_exit_notifier;
|
let mut term_exit_notifier = Arc::new(tokio::sync::Notify::new());
|
||||||
let reader = {
|
let reader = {
|
||||||
let s = self.sandbox.clone();
|
let s = self.sandbox.clone();
|
||||||
let mut sandbox = s.lock().await;
|
let mut sandbox = s.lock().await;
|
||||||
|
|
||||||
let p = sandbox.find_container_process(cid.as_str(), eid.as_str())?;
|
let p = sandbox.find_container_process(cid.as_str(), eid.as_str())?;
|
||||||
|
|
||||||
term_exit_notifier = p.term_exit_notifier.clone();
|
|
||||||
|
|
||||||
if p.term_master.is_some() {
|
if p.term_master.is_some() {
|
||||||
|
term_exit_notifier = p.term_exit_notifier.clone();
|
||||||
p.get_reader(StreamType::TermMaster)
|
p.get_reader(StreamType::TermMaster)
|
||||||
} else if stdout {
|
} else if stdout {
|
||||||
if p.parent_stdout.is_some() {
|
if p.parent_stdout.is_some() {
|
||||||
|
Loading…
Reference in New Issue
Block a user