[Gambas-devel] Unused signals to be sent

Benoît Minisini gambas at ...1...
Sun May 6 23:57:45 CEST 2012


Le 06/05/2012 23:23, tobi a écrit :
> On Sun, 06 May 2012, tobi wrote:
>> Hi,
>>
>> I know that at least SIGUSR1 is needed by gbx3 or something to abort the current program. I am
>> currently implementing an interface to the terminal driver to enable no-delay keyboard input. The
>> experiences of my research were several manual reset button hits because the keyboard was screwed
>> up when not properly cleaned up, which I didn't find nice and my computer neither - and of course
>> I learned all that I need to implement that _correctly_ ;). Now, the cleanup works great whenever:
>> * the program exits
>> * an error occurs
>> * the user hits ESC thrice during one second (emergency exit) (this enabled, however all users to
>>    screw up the program logic as it immediately exits the mode, the programmer chose for the
>>    application. But better than hardware reset if the program is misbehaving. I have to think about
>>    that...)
>>
>> I additionally, not only for consistency issues, want to be able to switch between virtual consoles
>> when in this NoDelay mode. In another program I saw that the authors used signals they taught the vt
>> driver to sent the program when a switch was requested from another vt to the one that program runs
>> in and in the current vt, they take that under direct control of the program. Not that difficult
>> but I need signals to be sent. What signal may I use? (The program I mentioned above uses SIGUSR1
>> and SIGUSR2 (for release and acquire) and I am not able to use these in Gambas, right? So which
>> one are sure to use?)
>>
>> (And, Benoît, wasn't there once the approach to register signal handlers using the interpreter API?
>> I still need that to enable the terminal Resize event)
>>
>> Regards,
>> Tobi
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gambas-devel mailing list
>> Gambas-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>>
>
> Benoît,
>
> another reason for the signal handler API (for some reason, I think that GB.Signal(int, void*) would
> do the job? Is that what you wanted to implement as we talked about the SIGWINCH handler in
> gb.ncurses? You mentioned pipes back then?): I just had a segfault trying a new feature and wished,
> that it could have been caught to properly shutdown the program, hence don't leave my keyboard in a
> state that I cannot operate with... Thank goodness, I have gpm in my daemons array now to reboot my
> machine softly...
>
> Gently await your reply.
>
> Regards,
> Tobi
>

You don't need to wait for the signal interpreter API to implement your 
own segfault handler if it is just for debugging purpose.

-- 
Benoît Minisini




More information about the Devel mailing list