Skip to content

Commit e4e7565

Browse files
author
lijiuyang.5137
committed
Fix Conductor SDK form bridge
1 parent d991609 commit e4e7565

4 files changed

Lines changed: 552 additions & 25 deletions

File tree

src/pty.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ impl PtyProcess {
5252
return;
5353
}
5454
unsafe {
55-
libc::kill(-self.pid, libc::SIGTERM);
56-
libc::kill(self.pid, libc::SIGTERM);
55+
if libc::kill(-self.pid, libc::SIGTERM) != 0 {
56+
libc::kill(self.pid, libc::SIGTERM);
57+
}
5758
}
5859
}
5960

@@ -73,8 +74,9 @@ impl PtyProcess {
7374
}
7475
if started.elapsed() >= timeout {
7576
unsafe {
76-
libc::kill(-pid, libc::SIGKILL);
77-
libc::kill(pid, libc::SIGKILL);
77+
if libc::kill(-pid, libc::SIGKILL) != 0 {
78+
libc::kill(pid, libc::SIGKILL);
79+
}
7880
libc::waitpid(pid, &mut status, 0);
7981
}
8082
self.pid = 0;

0 commit comments

Comments
 (0)