[Gambas-devel] Unused signals to be sent

tobi tobias at ...692...
Mon May 7 00:13:23 CEST 2012


On Sun, 06 May 2012, Benoît Minisini wrote:
> Le 06/05/2012 21:36, tobi a écrit :
> > Hi,
> >
> > I know that at least SIGUSR1 is needed by gbx3 or something to abort the current program.
> 
> Where did you see that? :-o
> 
> The SIGUSR1 is handled by a debugged program, so that the IDE can tell 
> him that the users has pressed the PAUSE button so that it stops on the 
> next line.

I read it somewhere or, what I deem less probable but not impossible, since I once was excited
about gb.signal, noticed it - yes, for sure with a debugged program. I seem to have generalised
that to Gambas interpreter...

> 
> > 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...)
> >
> 
> Are terminal programs run in an X11 terminual emulator concerned too?
> 

I will try that under X the next days... It's very tricky: I need an fd on which I can use the
console_ioctl(4)'s - another thing for the list of linux things, you want to avoid, maybe. Sorry, I
read that statement just a few minutes ago and working on that NoDelay mode for a few days (idea
came from Fabien who suggested to somehow bypass the keyboard repeat delay, on 15th April). The
needed console_ioctl fd cannot even be a PTY and I don't think, X will let me do this easily but
there will be a way around X restrictions by using X facilities, but I have to dig deeper into
that stuff... (Hmm, reading that text, it doesn't sound that cool :| It's rather special purpose and
the capability of switching to that mode can be tested by a property of Screen class so that the
programmer can continue with a "delayed" mode which utilises ncurses directly. The NoDelay mode
could be transparently use some X facility, if possible, that's no problem, I think)

> > 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?)
> 
> I don't understand what you are talking about. If you want to *send* 
> signal, no problem. Difficulty comes when you want to receive them.
> 

I instruct the vt driver to send signals to my process when switching to the vt controlled by my
program, so I will receive signals.

> >
> > (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)
> 
> Here is the point: to receive signals reliably, you need a bunch of code 
> that I want the interpreter to provide to the components through API.
> 
> I didn't write this API yet, because it is more complex than I thought 
> first. If you want more details, look at the "signalfd" system call that 
> can solve most of my problems, but that is alas Linux specific, so I 
> prefer not to use it!

Wow, thanks for pointing that out. Never heard of it but sounds rather useful! Sadly, it is not to
be incorporated into Gambas...
Don't worry, I have enough to do aside from that NoDelay mode...

> 
> Regards,
> 
> -- 
> Benoît Minisini
> 
> ------------------------------------------------------------------------------
> 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
> 

Regards,
Tobi





More information about the Devel mailing list