Re: [ros-dev] [ros-diffs] [aandrejevic] 62892: [NTVDM] Quit when ntvdm becomes the last process attached to the console.

2014-04-23 Thread Alexander Andrejevic
Hi,

The handle to that event is a private variable inside GetNextVDMCommand, so it 
cannot be used in NTVDM.

Regards,
Alex

On Wed, Apr 23, 2014 at 02:48:41AM +0200, Thomas Faber wrote:
> On 2014-04-22 22:46, aandreje...@svn.reactos.org wrote:
> > --- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original)
> > +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Tue Apr 22 
> > 20:46:50 2014
> > @@ -196,6 +197,11 @@
> >  EmulatorInterrupt(0x23);
> >  break;
> >  }
> > +case CTRL_LAST_CLOSE_EVENT:
> > +{
> > +if (CommandThread) TerminateThread(CommandThread, 0);
> > +break;
> > +}
> >  default:
> >  {
> >  /* Stop the VDM if the user logs out or closes the console */
> 
> 
> Wasn't there an event to tell that thread to exit?
> Using TerminateThread like this feels icky.
> 
> ___
> Ros-dev mailing list
> Ros-dev@reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev

-- 
Alexander Andrejevic 
SDF Public Access UNIX System - http://sdf.lonestar.org

___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev


Re: [ros-dev] [ros-diffs] [aandrejevic] 62892: [NTVDM] Quit when ntvdm becomes the last process attached to the console.

2014-04-22 Thread Thomas Faber
On 2014-04-22 22:46, aandreje...@svn.reactos.org wrote:
> --- branches/ntvdm/subsystems/ntvdm/ntvdm.c   [iso-8859-1] (original)
> +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c   [iso-8859-1] Tue Apr 22 
> 20:46:50 2014
> @@ -196,6 +197,11 @@
>  EmulatorInterrupt(0x23);
>  break;
>  }
> +case CTRL_LAST_CLOSE_EVENT:
> +{
> +if (CommandThread) TerminateThread(CommandThread, 0);
> +break;
> +}
>  default:
>  {
>  /* Stop the VDM if the user logs out or closes the console */


Wasn't there an event to tell that thread to exit?
Using TerminateThread like this feels icky.

___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev