Re: [PATCH 4/5] [kernel] Support opening of console for read (try 2)

2012-11-21 Thread Alexandre Julliard
Eric Pouech writes: > - seperate the process to read input from fd(0) and the current > running process >    (hence ensuring that we get the correct rights for writing) >    this is what we do with wineconsole (for other backends). > moving bare console to wineconsole >    could also

Re: [PATCH 4/5] [kernel] Support opening of console for read (try 2)

2012-11-20 Thread Ann and Jason Edmeades
On 20 November 2012 12:31, Alexandre Julliard wrote: > > That doesn't guarantee that it's the process console, console handles > can be passed across processes. > > So apologies if this is an ignorant question, I dont really understand this console logic properly so I was researching the options.

Re: [PATCH 4/5] [kernel] Support opening of console for read (try 2)

2012-11-20 Thread Eric Pouech
Le 20/11/2012 13:31, Alexandre Julliard a écrit : Eric Pouech writes: That doesn't look right. There's no guarantee that the handle is for the current process console. in fact, it's guaranted, because we check before (in the function calling this helper) that the handle is really a console ha

Re: [PATCH 4/5] [kernel] Support opening of console for read (try 2)

2012-11-20 Thread Alexandre Julliard
Eric Pouech writes: >> That doesn't look right. There's no guarantee that the handle is for the >> current process console. > in fact, it's guaranted, because we check before (in the function > calling this helper) that the handle is really a console handler and > that it's in bare mode > one cou

Re: [PATCH 4/5] [kernel] Support opening of console for read (try 2)

2012-11-20 Thread Eric Pouech
> That doesn't look right. There's no guarantee that the handle is for the > current process console. in fact, it's guaranted, because we check before (in the function calling this helper) that the handle is really a console handler and that it's in bare mode one could make it clearer by adding a c

Re: [PATCH 4/5] [kernel] Support opening of console for read (try 2)

2012-11-20 Thread Alexandre Julliard
Ann and Jason Edmeades writes: > +BOOL WINAPI write_console_input( HANDLE handle, const INPUT_RECORD *buffer, > + DWORD count, LPDWORD written ) > +{ > +BOOL result = WriteConsoleInputW(handle, buffer, count, written); > + > +/* If this fails with access de