亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? natwin32process.cc

?? linux下編程用 編譯軟件
?? CC
字號(hào):
// natWin32Process.cc - Native side of Win32 process code./* Copyright (C) 2003  Free Software Foundation   This file is part of libgcj.This software is copyrighted work licensed under the terms of theLibgcj License.  Please consult the file "LIBGCJ_LICENSE" fordetails.  */#include <config.h>#include <platform.h>// Conflicts with the definition in "java/lang/reflect/Modifier.h"#undef STRICT#include <java/lang/ConcreteProcess.h>#include <java/lang/IllegalThreadStateException.h>#include <java/lang/InterruptedException.h>#include <java/lang/NullPointerException.h>#include <java/lang/Thread.h>#include <java/io/File.h>#include <java/io/FileDescriptor.h>#include <java/io/FileInputStream.h>#include <java/io/FileOutputStream.h>#include <java/io/IOException.h>#include <java/lang/OutOfMemoryError.h>#include <gnu/java/nio/channels/FileChannelImpl.h>using gnu::java::nio::channels::FileChannelImpl;voidjava::lang::ConcreteProcess::cleanup (void){  // FIXME:  // We used to close the input, output and  // error streams here, but we can't do that  // because the caller also has the right  // to close these and FileInputStream and FileOutputStream  // scream if you attempt to close() them twice. Presently,  // we use _Jv_platform_close_on_exec, which is similar  // to the POSIX approach.  //  // What I wanted to do is have private nested  // classes in ConcreteProcess which extend FileInputStream  // and FileOutputStream, respectively, but override  // close() to permit multiple calls to close(). This  // led to class header and platform configury issues  // that I didn't feel like dealing with. However,  // this approach could conceivably be a good multiplatform  // one since delaying the pipe close until process  // termination could be wasteful if many child processes  // are spawned within the parent process' lifetime.  inputStream = NULL;  outputStream = NULL;  errorStream = NULL;    if (procHandle)    {      CloseHandle((HANDLE) procHandle);      procHandle = (jint) INVALID_HANDLE_VALUE;    }}voidjava::lang::ConcreteProcess::destroy (void){  if (! hasExited ())    {      // Kill it forcibly and assign an (arbitrary) exit code of 0.      TerminateProcess ((HANDLE) procHandle, 0);      exitCode = 0;      cleanup ();    }}jbooleanjava::lang::ConcreteProcess::hasExited (void){  DWORD exitStatus;  if (GetExitCodeProcess ((HANDLE) procHandle, &exitStatus) != 0)    {      // NOTE: STILL_ACTIVE is defined as "259" by Win32 - if the      // child actually exits with this return code, we have a      // problem here. See MSDN documentation on GetExitCodeProcess( ).      if (exitStatus == STILL_ACTIVE)        return false;      else        {          cleanup ();          exitCode = exitStatus;          return true;        }    }  else    return true;}jintjava::lang::ConcreteProcess::waitFor (void){  if (! hasExited ())    {      DWORD exitStatus = 0UL;      // Set up our waitable objects array      // - 0: the handle to the process we just launched      // - 1: our thread's interrupt event      HANDLE arh[2];      arh[0] = (HANDLE) procHandle;      arh[1] = _Jv_Win32GetInterruptEvent ();      DWORD rval = WaitForMultipleObjects (2, arh, 0, INFINITE);      // Use the returned value from WaitForMultipleObjects      // instead of our thread's interrupt_flag to test for      // thread interruption. See the comment for      // _Jv_Win32GetInterruptEvent().      bool bInterrupted = rval == (WAIT_OBJECT_0 + 1);            if (bInterrupted)        {          // Querying this forces a reset our thread's interrupt flag.          Thread::interrupted();                    cleanup ();          throw new InterruptedException ();        }      GetExitCodeProcess ((HANDLE) procHandle, &exitStatus);      exitCode = exitStatus;      cleanup ();    }  return exitCode;}// Helper class for creating and managing the pipes// used for I/O redirection for child processes.class ChildProcessPipe{public:  // Indicates from the child process' point of view  // whether the pipe is for reading or writing.  enum EType {INPUT, OUTPUT};  ChildProcessPipe(EType eType);  ~ChildProcessPipe();    // Returns a pipe handle suitable for use by the parent process  HANDLE getParentHandle();    // Returns a pipe handle suitable for use by the child process.  HANDLE getChildHandle();  private:  EType m_eType;  HANDLE m_hRead, m_hWrite;};ChildProcessPipe::ChildProcessPipe(EType eType):  m_eType(eType){  SECURITY_ATTRIBUTES sAttrs;  // Explicitly allow the handles to the pipes to be inherited.  sAttrs.nLength = sizeof (SECURITY_ATTRIBUTES);  sAttrs.bInheritHandle = 1;  sAttrs.lpSecurityDescriptor = NULL;  if (CreatePipe (&m_hRead, &m_hWrite, &sAttrs, 0) == 0)    {      DWORD dwErrorCode = GetLastError ();      throw new java::io::IOException (        _Jv_WinStrError (_T("Error creating pipe"), dwErrorCode));    }  // If this is the read end of the child, we need  // to make the parent write end non-inheritable. Similarly,  // if this is the write end of the child, we need to make  // the parent read end non-inheritable. If we didn't  // do this, the child would inherit these ends and we wouldn't  // be able to close them from our end. For full details,  // do a Google search on "Q190351".  HANDLE& rhStd = m_eType==INPUT ? m_hWrite : m_hRead;  _Jv_platform_close_on_exec (rhStd);}ChildProcessPipe::~ChildProcessPipe(){  // Close the parent end of the pipe. This  // destructor is called after the child process  // has been spawned.  CloseHandle(getChildHandle());}HANDLE ChildProcessPipe::getParentHandle(){  return m_eType==INPUT ? m_hWrite : m_hRead;}HANDLE ChildProcessPipe::getChildHandle(){  return m_eType==INPUT ? m_hRead : m_hWrite;}voidjava::lang::ConcreteProcess::startProcess (jstringArray progarray,                                           jstringArray envp,                                           java::io::File *dir){  using namespace java::io;  procHandle = (jint) INVALID_HANDLE_VALUE;  // Reconstruct the command line.  jstring *elts = elements (progarray);  int cmdLineLen = 0;  for (int i = 0; i < progarray->length; ++i)    cmdLineLen += (elts[i]->length() + 1);  LPTSTR cmdLine = (LPTSTR) _Jv_Malloc ((cmdLineLen + 1) * sizeof(TCHAR));  LPTSTR cmdLineCurPos = cmdLine;  for (int i = 0; i < progarray->length; ++i)    {      if (i > 0)        *cmdLineCurPos++ = _T(' ');              jint len = elts[i]->length();      JV_TEMP_STRING_WIN32(thiselt, elts[i]);      _tcscpy(cmdLineCurPos, thiselt);      cmdLineCurPos += len;    }  *cmdLineCurPos = _T('\0');  // Get the environment, if any.  LPTSTR env = NULL;  if (envp)    {      elts = elements (envp);      int envLen = 0;      for (int i = 0; i < envp->length; ++i)        envLen += (elts[i]->length() + 1);      env = (LPTSTR) _Jv_Malloc ((envLen + 1) * sizeof(TCHAR));      int j = 0;      for (int i = 0; i < envp->length; ++i)        {          jint len = elts[i]->length();                    JV_TEMP_STRING_WIN32(thiselt, elts[i]);          _tcscpy(env + j, thiselt);                    j += len;                    // Skip past the null terminator that _tcscpy just inserted.          j++;        }      *(env + j) = _T('\0');    }  // Get the working directory path, if specified.  JV_TEMP_STRING_WIN32 (wdir, dir ? dir->getPath () : 0);  errorStream = NULL;  inputStream = NULL;  outputStream = NULL;  java::lang::Throwable *exc = NULL;  try    {      // We create anonymous pipes to communicate with the child      // on each of standard streams.      ChildProcessPipe aChildStdIn(ChildProcessPipe::INPUT);      ChildProcessPipe aChildStdOut(ChildProcessPipe::OUTPUT);      ChildProcessPipe aChildStdErr(ChildProcessPipe::OUTPUT);      outputStream = new FileOutputStream (new FileChannelImpl (                           (jint) aChildStdIn.getParentHandle (),			   FileChannelImpl::WRITE));      inputStream = new FileInputStream (new FileChannelImpl (                           (jint) aChildStdOut.getParentHandle (),			   FileChannelImpl::READ));      errorStream = new FileInputStream (new FileChannelImpl (                           (jint) aChildStdErr.getParentHandle (),			   FileChannelImpl::READ));      // Now create the child process.      PROCESS_INFORMATION pi;      STARTUPINFO si;      ZeroMemory (&pi, sizeof (PROCESS_INFORMATION));      ZeroMemory (&si, sizeof (STARTUPINFO));      si.cb = sizeof (STARTUPINFO);      // Explicitly specify the handles to the standard streams.      si.dwFlags |= STARTF_USESTDHANDLES;      si.hStdInput = aChildStdIn.getChildHandle();      si.hStdOutput = aChildStdOut.getChildHandle();      si.hStdError = aChildStdErr.getChildHandle();      // Spawn the process. CREATE_NO_WINDOW only applies when      // starting a console application; it suppresses the      // creation of a console window. This flag is ignored on      // Win9X.            if (CreateProcess (NULL,                         cmdLine,                         NULL,                         NULL,                         1,                         CREATE_NO_WINDOW | CREATE_UNICODE_ENVIRONMENT,                         env,                         wdir,                         &si,                         &pi) == 0)        {          DWORD dwErrorCode = GetLastError ();          throw new IOException (            _Jv_WinStrError (_T("Error creating child process"), dwErrorCode));        }      procHandle = (jint ) pi.hProcess;      _Jv_Free (cmdLine);      if (env != NULL)        _Jv_Free (env);    }  catch (java::lang::Throwable *thrown)    {      cleanup ();      exc = thrown;    }  if (exc != NULL)    throw exc;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产三级a在线观看| 调教+趴+乳夹+国产+精品| 国产一区二区免费看| 国产精品三级av| 8v天堂国产在线一区二区| 成人视屏免费看| 日韩电影免费在线| 亚洲女厕所小便bbb| 久久综合五月天婷婷伊人| 欧美影视一区在线| 国产成+人+日韩+欧美+亚洲| 夜夜精品视频一区二区 | 国产欧美日韩视频在线观看| 在线精品视频小说1| 成人开心网精品视频| 北条麻妃一区二区三区| 久久精品国产精品青草| 亚洲国产成人av| 亚洲久本草在线中文字幕| 久久久99精品免费观看不卡| 91精品国产综合久久婷婷香蕉| 欧美午夜精品久久久久久超碰 | 99国产精品国产精品久久| 亚州成人在线电影| 亚洲人成7777| 亚洲二区视频在线| 亚洲va国产va欧美va观看| 午夜伦理一区二区| 无码av中文一区二区三区桃花岛| 一区二区三区在线看| 国产精品久久三| 欧美老肥妇做.爰bbww| 91社区在线播放| 97久久精品人人做人人爽50路| www.激情成人| 欧美日韩aaaaa| 69久久夜色精品国产69蝌蚪网| 91麻豆精品国产91久久久资源速度 | 欧美中文字幕一区二区三区亚洲 | 久久久久久久国产精品影院| 56国语精品自产拍在线观看| 日韩美女视频在线| 日韩免费在线观看| 国产精品日产欧美久久久久| 洋洋成人永久网站入口| 九九**精品视频免费播放| 九九九久久久精品| 91蜜桃视频在线| 欧美一区二区三区电影| 欧美做爰猛烈大尺度电影无法无天| 欧美日韩精品欧美日韩精品一| 欧美mv日韩mv国产| 337p粉嫩大胆色噜噜噜噜亚洲| 日本一区二区在线不卡| 午夜一区二区三区视频| 成人性生交大片| 欧美一级黄色录像| 精品国产乱码久久久久久久久 | 中文字幕日韩一区| 欧美午夜在线观看| 久久九九全国免费| 日韩国产欧美在线视频| 99久久er热在这里只有精品66| 欧美一级二级在线观看| 成人欧美一区二区三区在线播放| 三级久久三级久久久| 午夜精品一区二区三区三上悠亚| 风间由美一区二区三区在线观看 | 日韩欧美二区三区| 亚洲色图制服诱惑| 中文成人av在线| 日韩电影免费在线| 在线视频你懂得一区| 日本一区二区免费在线| 亚洲v中文字幕| caoporen国产精品视频| 欧美成人一区二区三区在线观看 | 日本欧美久久久久免费播放网| av日韩在线网站| 国产视频911| 久久精品国产色蜜蜜麻豆| 欧美视频一区二区三区在线观看| 国产精品麻豆网站| 国产精品一区免费视频| 成人高清免费观看| 欧美日韩国产不卡| 亚洲欧洲制服丝袜| 99re这里都是精品| 国产精品国产自产拍高清av王其 | 国产一区二三区| 欧美一区欧美二区| 亚洲成人动漫在线免费观看| 色88888久久久久久影院按摩| 日韩视频免费观看高清完整版 | 国产精品91xxx| 精品国产青草久久久久福利| 爽好久久久欧美精品| 欧美专区日韩专区| 亚洲综合色婷婷| 国产不卡视频在线播放| 久久这里只有精品6| 美日韩一区二区| 一本色道久久综合亚洲aⅴ蜜桃| 欧美日韩亚洲综合在线 | 亚洲无人区一区| 在线亚洲人成电影网站色www| 中文字幕亚洲成人| 97se亚洲国产综合自在线| 中文字幕在线不卡一区| 99r国产精品| 一区二区在线观看视频| 在线亚洲高清视频| 亚洲va在线va天堂| 91精品欧美久久久久久动漫 | 亚洲国产中文字幕| 欧美日韩一二区| 免费在线视频一区| 欧美亚洲国产一区二区三区| 依依成人综合视频| 欧美日本一区二区| 美女性感视频久久| 久久婷婷国产综合精品青草| 成人深夜在线观看| 一区二区三区鲁丝不卡| 在线免费观看日韩欧美| 亚洲成人免费av| 日韩久久久精品| 国产乱码一区二区三区| 中文字幕不卡一区| 国内精品免费在线观看| 日韩美女天天操| 国产成人丝袜美腿| 日韩限制级电影在线观看| 久久 天天综合| 国产精品美女一区二区| 日本久久电影网| 秋霞国产午夜精品免费视频| 久久青草欧美一区二区三区| 色综合久久天天| 日韩影院精彩在线| 亚洲精品在线三区| 91首页免费视频| 日本色综合中文字幕| 欧美激情一区二区在线| 91福利国产精品| 韩国三级电影一区二区| 亚洲同性gay激情无套| 欧美精品乱码久久久久久| 国产精品一色哟哟哟| 亚洲综合色视频| 国产色产综合色产在线视频| 在线精品国精品国产尤物884a| 蜜臀av一级做a爰片久久| 亚洲欧美在线观看| 欧美一级欧美一级在线播放| 成人一区二区视频| 日韩av中文在线观看| 亚洲欧洲www| 日韩欧美国产小视频| 91蜜桃传媒精品久久久一区二区| 麻豆精品在线播放| 亚洲嫩草精品久久| 国产亚洲人成网站| 欧美精品777| 99re这里都是精品| 国产精品中文欧美| 午夜电影一区二区三区| 国产精品久久久久久久久久免费看| 欧美一区二区私人影院日本| 91免费在线看| 国产一区二区毛片| 日本欧美久久久久免费播放网| 亚洲欧美区自拍先锋| 国产无一区二区| 精品人在线二区三区| 欧美亚洲免费在线一区| 成人免费高清视频| 久久精品国产久精国产爱| 亚洲高清免费在线| **性色生活片久久毛片| 久久综合九色综合97婷婷女人| 69堂国产成人免费视频| 欧美羞羞免费网站| 成人高清免费观看| 国产成人综合在线观看| 久久精品国产99国产精品| 亚洲午夜久久久| 亚洲人一二三区| 亚洲国产成人一区二区三区| 精品福利一二区| 3d动漫精品啪啪1区2区免费| 色88888久久久久久影院野外| av在线这里只有精品| 成人一级片在线观看| 国产剧情一区二区| 国产麻豆视频一区| 极品瑜伽女神91| 久久国产尿小便嘘嘘尿| 麻豆免费看一区二区三区| 水蜜桃久久夜色精品一区的特点|