From 6b488a4e2b799b46d78fbda6a5301cc128572729 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 23 Jul 2017 16:03:04 -0600 Subject: [PATCH] Fix negation of pgid --- src/pty.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pty.rs b/src/pty.rs index 6155cb6688..6b895fb5cd 100644 --- a/src/pty.rs +++ b/src/pty.rs @@ -101,7 +101,7 @@ impl Pty { if b == cc[VERASE] { println!("ERASE"); - ignore = true; + //ignore = true; } if b == cc[VWERASE] && iexten { @@ -125,7 +125,8 @@ impl Pty { println!("VINTR"); if self.pgrp != 0 { - let _ = syscall::kill(!self.pgrp, syscall::SIGINT); + println!("pgrp {}", self.pgrp); + let _ = syscall::kill(-(self.pgrp as isize) as usize, syscall::SIGINT); } ignore = true; @@ -135,7 +136,8 @@ impl Pty { println!("VQUIT"); if self.pgrp != 0 { - let _ = syscall::kill(!self.pgrp, syscall::SIGQUIT); + println!("pgrp {}", self.pgrp); + let _ = syscall::kill(-(self.pgrp as isize) as usize, syscall::SIGQUIT); } ignore = true; @@ -145,7 +147,8 @@ impl Pty { println!("VSUSP"); if self.pgrp != 0 { - let _ = syscall::kill(!self.pgrp, syscall::SIGTSTP); + println!("pgrp {}", self.pgrp); + let _ = syscall::kill(-(self.pgrp as isize) as usize, syscall::SIGTSTP); } ignore = true;