Request for review (S): 7022037: Pause when exiting if a debugger is attached on windows
keith.mcguigan at oracle.com
Fri Feb 25 07:13:41 PST 2011
I think that looks better, thanks for making those changes. Two minor
(1) os.hpp:496 - you don't need the "os::" prefix here.
(2) (and this isn't a big deal) Why go through the work in the
arguments code to determine the launcher and store that result rather
than just looking at the _sun_java_launcher value at the time that you
need it (in check_and_debugger_and_wait())?
On Feb 25, 2011, at 9:56 AM, Staffan Larsen wrote:
> And I should have included the latest webrev link: http://cr.openjdk.java.net/~sla/7022037/webrev.04/
>> -----Original Message-----
>> From: Staffan Larsen
>> Sent: den 25 februari 2011 15:47
>> To: Dmitriy Samersoff
>> Cc: Dmitriy Samersoff; hotspot-runtime-dev at openjdk.java.net
>> Subject: RE: Request for review (S): 7022037: Pause when exiting if a
>> debugger is attached on windows
>>> On 2011-02-25 16:46, Staffan Larsen wrote:
>>>>> 1. I think it's better to create the diagnostic flag PauseAtExit
>>>>> default false and then change this value to true if we run gamma
>>>>> than check for gamma launcher every time.
>>>> I can do that. Where would be a good place to do this check?
>>> See comment from Keith, I agree with him.
>> I didn't see anything about this in Keith's reply.
>>>>> 3. May be it's better to use ReadConsoleInput and
>>>>> address the case where stdin is overloaded/intercepted by ide.
>>>>> console function could determine whether console attached or not
>>>>> don't try to read from within service)
>>>> How do you determine if a console is attached? AttachConsole and
>>> check that error isn't ERROR_INVALID_HANDLE? I haven't used the
>>> Windows console API before.
>>> If my memory is not bogus GetConsoleMode returns error if console
>>> attached but it's better to check it.
>> Since I will only wait for key press if the gamma launcher is used,
>> and the gamma launcher is a console application, I don't think
>> further checks are necessary. Do you agree?
More information about the hotspot-runtime-dev