From kde-core-devel Thu Jan 31 20:07:21 2008 From: Allen Winter Date: Thu, 31 Jan 2008 20:07:21 +0000 To: kde-core-devel Subject: Re: [PATCH] Reset signal handlers in KProcess child Message-Id: <200801311507.21866.winter () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=120181012405613 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_5pioHDBpCVcgtgi" --Boundary-00=_5pioHDBpCVcgtgi Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit On Friday 25 January 2008 23:22:55 Robert Knight wrote: > Hi, > > K3Process used to reset signal handler for all signals to SIG_DFL just > after forking. QProcess/KProcess currently do not do this. This > caused a problem in Konsole where pressing Ctrl+C did terminate many > programs run in the shell because they inherited a SIG_IGN handler for > the SIGINT signal from the shell which inherited it from Konsole. > Konsole ultimately inherited SIGINT from somewhere else, it looks like > KDM might be the cause (See process.c:Fork) > > The attached patch causes KProcess to reset its child's signal > handlers back to SIG_DFL in setupChildProcess(). Is this the right > solution? > Was there a consensus on how to solve this? Sure would be nice to have Ctrl+C working in konsole. --Boundary-00=_5pioHDBpCVcgtgi Content-Type: text/html; charset="iso-8859-6" Content-Transfer-Encoding: 7bit

On Friday 25 January 2008 23:22:55 Robert Knight wrote:

> Hi,

>

> K3Process used to reset signal handler for all signals to SIG_DFL just

> after forking. QProcess/KProcess currently do not do this. This

> caused a problem in Konsole where pressing Ctrl+C did terminate many

> programs run in the shell because they inherited a SIG_IGN handler for

> the SIGINT signal from the shell which inherited it from Konsole.

> Konsole ultimately inherited SIGINT from somewhere else, it looks like

> KDM might be the cause (See process.c:Fork)

>

> The attached patch causes KProcess to reset its child's signal

> handlers back to SIG_DFL in setupChildProcess(). Is this the right

> solution?

>

Was there a consensus on how to solve this?

Sure would be nice to have Ctrl+C working in konsole.

--Boundary-00=_5pioHDBpCVcgtgi--