linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [patch 09/20] uml: use SIG_IGN for empty sighandler
@ 2004-11-03 23:17 blaisorblade_spam
  2004-11-04  4:51 ` [uml-devel] " Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: blaisorblade_spam @ 2004-11-03 23:17 UTC (permalink / raw)
  To: akpm; +Cc: jdike, linux-kernel, user-mode-linux-devel, cw, blaisorblade_spam


Avoid creating a dummy no-op procedure instead of using SIG_IGN.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
---

 vanilla-linux-2.6.9-paolo/arch/um/drivers/chan_user.c |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)

diff -puN arch/um/drivers/chan_user.c~uml-use-SIG_IGN-for-empty-handling arch/um/drivers/chan_user.c
--- vanilla-linux-2.6.9/arch/um/drivers/chan_user.c~uml-use-SIG_IGN-for-empty-handling	2004-11-03 23:44:59.439523936 +0100
+++ vanilla-linux-2.6.9-paolo/arch/um/drivers/chan_user.c	2004-11-03 23:44:59.442523480 +0100
@@ -37,10 +37,6 @@ int generic_console_write(int fd, const 
 	return(err);
 }
 
-static void winch_handler(int sig)
-{
-}
-
 struct winch_data {
 	int pty_fd;
 	int pipe_fd;
@@ -63,7 +59,7 @@ static int winch_thread(void *arg)
 		printk("winch_thread : failed to write synchronization "
 		       "byte, err = %d\n", -count);
 
-	signal(SIGWINCH, winch_handler);
+	signal(SIGWINCH, SIG_IGN);
 	sigfillset(&sigs);
 	sigdelset(&sigs, SIGWINCH);
 	if(sigprocmask(SIG_SETMASK, &sigs, NULL) < 0){
_


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] Re: [patch 09/20] uml: use SIG_IGN for empty sighandler
  2004-11-04  4:51 ` [uml-devel] " Jeff Dike
@ 2004-11-04  4:11   ` Blaisorblade
  2004-11-05  5:48     ` Jeff Dike
  0 siblings, 1 reply; 4+ messages in thread
From: Blaisorblade @ 2004-11-04  4:11 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Jeff Dike, akpm, linux-kernel, cw

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

On Thursday 04 November 2004 05:51, Jeff Dike wrote:
> blaisorblade_spam@yahoo.it said:
> > Avoid creating a dummy no-op procedure instead of using SIG_IGN.
>
> Andrew, can you hold off on this one?

> I did that on purpose, and as soon 
> as I remember why, I'll know whether this patch is good :-)
I had a doubt on this, but I was not getting much feedback from you...
Also, if you reject this, I'd require a comment-only patch for it:
"as soon as I remember why" makes me think back to my yesterday's class, when 
the teacher said "put comments in your code or you'll soon forget what it 
does!" 8-O (yes, 1st year University student :-( ).

> The other patches are OK by me.  Consider them acked.
Very fine.

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [uml-devel] Re: [patch 09/20] uml: use SIG_IGN for empty sighandler
  2004-11-03 23:17 [uml-devel] [patch 09/20] uml: use SIG_IGN for empty sighandler blaisorblade_spam
@ 2004-11-04  4:51 ` Jeff Dike
  2004-11-04  4:11   ` Blaisorblade
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Dike @ 2004-11-04  4:51 UTC (permalink / raw)
  To: blaisorblade_spam, akpm; +Cc: linux-kernel, user-mode-linux-devel, cw

blaisorblade_spam@yahoo.it said:
> Avoid creating a dummy no-op procedure instead of using SIG_IGN. 

Andrew, can you hold off on this one?  I did that on purpose, and as soon
as I remember why, I'll know whether this patch is good :-)

The other patches are OK by me.  Consider them acked.

				Jeff



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [uml-devel] Re: [patch 09/20] uml: use SIG_IGN for empty sighandler
  2004-11-04  4:11   ` Blaisorblade
@ 2004-11-05  5:48     ` Jeff Dike
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Dike @ 2004-11-05  5:48 UTC (permalink / raw)
  To: Blaisorblade; +Cc: user-mode-linux-devel, akpm, linux-kernel, cw

blaisorblade_spam@yahoo.it said:
> I had a doubt on this, but I was not getting much feedback from you...
Yeah, sorry.

> Also, if you reject this, I'd require a comment-only patch for it: "as
> soon as I remember why" makes me think back to my yesterday's class,
> when  the teacher said "put comments in your code or you'll soon
> forget what it  does!" 8-O (yes, 1st year University student :-( ). 

The thing is, you often don't realize what's going to be mysterious until it 
actually is, and then it's too late for the comment :-)

In this case, it wants to be bounced out of sigprocmask when a SIGWINCH 
arrives.  In order to do so, it must have a handler registered, even if
it does nothing.

				Jeff



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-11-05  4:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03 23:17 [uml-devel] [patch 09/20] uml: use SIG_IGN for empty sighandler blaisorblade_spam
2004-11-04  4:51 ` [uml-devel] " Jeff Dike
2004-11-04  4:11   ` Blaisorblade
2004-11-05  5:48     ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox