Re: opie and gpe light problem

Michael 'Mickey' Lauer <[email protected]>
Newsgroups gmane.comp.handhelds.opie
Organization Institute of Computer Science, University of Frankfurt
Message-ID <[email protected]>
Am Mittwoch, den 01.03.2006, 14:58 +0100 schrieb Karsten Römke:
> Hi and thanks,
> I use Opie-start and then terminal and it works - but if I go back
> from gpe via chvt 3 opie is still available - I thought
> the bug is solved by suspending complete opie - or means suspending
> not /etc/init.d/opie stop?

No, that would be too heavyweight. The corresponding code snippet from
VTapplet is:

void VTApplet::changeVT( int index )
{
    int fd = ::open("/dev/tty0", O_RDWR);
    if ( fd == -1 ) return;
    ::ioctl( fd, VT_ACTIVATE, index-500 );
    if ( m_ourVT )
    {
        odebug << "VTApplet::waiting for user to return to VT " <<
m_ourVT << oendl;
        ::ioctl( fd, VT_WAITACTIVE, m_ourVT );
    }
}

which means, we are switching to the requested terminal via VT_ACTIVATE
and then suspend the opie process by calling VT_WAITACTIVE. This ioctl
is blocking until the VT layer has been requested to change to whatever
VT Opie has been started on.

-- 
Regards,

Mickey.
------------------------------------------------------------------
Dipl.-Inf. Michael 'Mickey' Lauer <[email protected]>
------------------------------------------------------------------


_______________________________________________
Open Source User Interface and Apps built on Qt Embedded
Opie mailing list
[email protected]
https://handhelds.org/mailman/listinfo/opie
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.