Re: [PATCH] fdisk: properly handle SIGINTs for better user control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-11-23 at 21:49 +0100, Karel Zak wrote:
> On Mon, Nov 15, 2010 at 08:52:46AM -0300, Davidlohr Bueso wrote:
> > +static void
> > +sighand(int sig) {
> > +	if (sig == SIGINT)
> > +		is_mainmenu() ? _exit(EXIT_SUCCESS) : main_menu();
>                                               ^^^^^^^^^^
> > +}
> 
>  So you moved whole fdisk to signal handler, really?

Isn't that the only way to catch signals?

> 
>  The fdisk command usually wait on read_int() and read_char(), you
>  have to care about these functions and properly return to the top
>  level menu or xmenu.

Good point about the levels in fdisk. I was only considering the top
level and one sublevel.


--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux