Changeset 140


Ignore:
Timestamp:
Sep 4, 2010, 1:10:40 AM (15 years ago)
Author:
dmik
Message:

jdk. sun.tools.attach: Partly adopted to OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/jdk/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c

    r2 r140  
    5151    (const char* cmd, const char* arg1, const char* arg2, const char* arg3, const char* pipename);
    5252
     53#ifndef __WIN32OS2__
    5354/* OpenProcess with SE_DEBUG_NAME privilege */
    5455static HANDLE
    5556doPrivilegedOpenProcess(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwProcessId);
     57#endif /* __WIN32OS2__ */
    5658
    5759/* convert jstring to C string */
     
    9193 * Code copied to target process
    9294 */
     95#ifdef _MSC_VER
    9396#pragma check_stack (off)
     97#endif
    9498static DWORD WINAPI thread_func(DataBlock *pData)
    9599{
     
    121125static void thread_end (void) {
    122126}
     127#ifdef _MSC_VER
    123128#pragma check_stack
     129#endif
    124130
    125131
     
    181187     */
    182188    hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
     189#ifndef __WIN32OS2__
    183190    if (hProcess == NULL && GetLastError() == ERROR_ACCESS_DENIED) {
    184191        hProcess = doPrivilegedOpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
    185192    }
     193#endif /* __WIN32OS2__ */
    186194
    187195    if (hProcess == NULL) {
     
    459467}
    460468
     469#ifndef __WIN32OS2__
     470
    461471/*
    462472 * Attempts to enable the SE_DEBUG_NAME privilege and open the given process.
     
    557567}
    558568
     569#endif /* __WIN32OS2__ */
     570
    559571/* convert jstring to C string */
    560572static void jstring_to_cstring(JNIEnv* env, jstring jstr, char* cstr, int len) {
Note: See TracChangeset for help on using the changeset viewer.