[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] Reset signal handlers in KProcess child
From:       Allen Winter <winter () kde ! org>
Date:       2008-01-31 20:07:21
Message-ID: 200801311507.21866.winter () kde ! org
[Download RAW message or body]

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.

[Attachment #3 (text/html)]

<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">On Friday 25 \
January 2008 23:22:55 Robert Knight wrote:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;">&gt; Hi,</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&gt;</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;">&gt; K3Process used to reset signal handler for \
all signals to SIG_DFL just</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&gt; after \
forking.  QProcess/KProcess currently do not do this.  This</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;">&gt; caused a problem in Konsole where pressing \
Ctrl+C did terminate many</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&gt; \
programs run in the shell because they inherited a SIG_IGN handler for</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;">&gt; the SIGINT signal from the shell which \
inherited it from Konsole.</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&gt; Konsole \
ultimately inherited SIGINT from somewhere else, it looks like</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;">&gt; KDM might be the cause (See \
process.c:Fork)</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px;">&gt;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;">&gt; The attached patch causes KProcess to \
reset its child's signal</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&gt; \
handlers back to SIG_DFL in setupChildProcess().  Is this the right</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px;">&gt; solution?</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;">&gt;</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Was there a consensus on how \
to solve this?</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sure would be nice to have \
Ctrl+C working in konsole.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"></p></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic