Request for review (S): 7022037: Pause when exiting if a debugger is attached on windows
staffan.larsen at oracle.com
Fri Feb 25 05:46:59 PST 2011
> -----Original Message-----
> From: Dmitry Samersoff
> Sent: den 25 februari 2011 13:47
> To: Staffan Larsen
> Cc: hotspot-runtime-dev at openjdk.java.net
> Subject: Re: Request for review (S): 7022037: Pause when exiting if a
> debugger is attached on windows
> 1. I think it's better to create the diagnostic flag PauseAtExit with
> 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? Inside Arguments::process_sun_java_launcher_properties()?
> 2. I think wait_for_key_press() should be inserted into the all
> where vm exists (i.e. where notify_vm_shutdown called) rather than to
> notify_vm_shutdown. This function (notify_vm_shutdown) has it's own
> concrete semantic and I would prefer to keep it.
I can fix that.
> 3. May be it's better to use ReadConsoleInput and WaitForSingleObject
> address the case where stdin is overloaded/intercepted by ide. Also
> 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.
More information about the hotspot-runtime-dev