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

Re: [MiNT] patch:MiNT:single-task



On Wed, 2010-06-02 at 15:47 +0000, Helmut Karlowski wrote:
> Alan Hourihane wrote:
> 
> > > > Could PD have redirected output to file descriptor -1 ?
> > >
> > > Is there a way to test this? If it would be redirected then the close
> > > should be performed.
> >
> > A test app could be made - yes.
> 
> I meant a test inside MiNT - something like f->links > 0 or whatever. PD
> does not do anything with -1, but the debugged apps may call a
> Fclose(-1) before they exit for some reason. And these apps are PD for
> MiNT so it has no kbd after the PD-client has exited.

I think we need to understand why apps call Fclose(-1) and what they
expect first.

> > > > By not closing are we risking losing some data here.
> > >
> > > Yes, this could possibly occur.
> >
> > Ouch, I don't think that's acceptable.
> 
> Only the debugged app can suffer from this. And when you use ST-mode you
> have to know what you do anyway.

O.k. But we still need to understand what an application expects from
doing Fclose(-1).

> >
> > > > Can you give some help on what F/M_DONT_STOP imply ?
> > >
> > > From my changelog:
> > >
> > > ---
> > > To control this currently there has to be the bit 16 (0x10000) set in
> > > p_flags of the relevant binary.
> > >
> > > Any client that has bit 17 (0x20000) set, is not stopped except when the
> > > single-task-app has this bit also set, i.e. when it has 0x3xxxx.
> > > ---
> >
> > Are you saying that sending a signal such as SIGKILL to the
> > application wouldn't stop it ?
> 
> Where did I say that? You can kill PD for example using the taskmanager
> (once the PD-client does AES-calls). But this is at own risk ;)

Then I'm misunderstanding what you mean by "is not stopped". Can you
clarify ?

> > > The reason to bypass the timeout is that PD disables the timer-interrupt
> > > (I think) and there would only be one keypress possible. The same
> > > happens when you boot with GEM=ROM on original hardware (don't know why
> > > it happens there). I was thinking to extend this for the ROM-desktop to
> > > have keyboard there too.
> >
> > Are you saying you get no key events when using the current code ?
> 
> Yes.

O.k. I think we need to understand if PD really is disabling timers
here.

> > I think I'll go and grab PD to see what gives.
> 
> And try to use ROM-desktop too.

Will do.

Alan.