文件名称:Createprocess
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.28mb
- 下载次数:
- 0次
- 提 供 者:
- 得*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
创建进程
文件包含在linux和windows下创建进程的算法
设计并实现Unix的“time”命令。“mytime”命令通过命令行参数接受要运行的程序,创建一个独立的进程来运行该程序,并记录程序运行的时间。
在Windows下实现:
• 使用CreateProcess()来创建进程
• 使用WaitForSingleObject()在“mytime”命令和新创建的进程之间同步
• 调用GetSystemTime()来获取时间
在Linux下实现:
• 使用fork()/execv()来创建进程运行程序
• 使用wait()等待新创建的进程结束
• 调用gettimeofday()来获取时间
-Create process
File contains under the Windows in the process of creating and Linux algorithm
Design and implement the "time" Unix commands. "Mytime" command through the command line parameters to accept applications, creating a separate process to run this program, and record the process of running time.
Under Windows:
CreateProcess (), use to create process
Use WaitForSingleObject (), in the "new" command and mytime process of creating between synchronization
GetSystemTime (), call for time
To realize the Linux in:
Use fork (,)/execv () to create a process to run the program
Using pro (), waiting for a new process of creating
Gettimeofday (), calls for time
文件包含在linux和windows下创建进程的算法
设计并实现Unix的“time”命令。“mytime”命令通过命令行参数接受要运行的程序,创建一个独立的进程来运行该程序,并记录程序运行的时间。
在Windows下实现:
• 使用CreateProcess()来创建进程
• 使用WaitForSingleObject()在“mytime”命令和新创建的进程之间同步
• 调用GetSystemTime()来获取时间
在Linux下实现:
• 使用fork()/execv()来创建进程运行程序
• 使用wait()等待新创建的进程结束
• 调用gettimeofday()来获取时间
-Create process
File contains under the Windows in the process of creating and Linux algorithm
Design and implement the "time" Unix commands. "Mytime" command through the command line parameters to accept applications, creating a separate process to run this program, and record the process of running time.
Under Windows:
CreateProcess (), use to create process
Use WaitForSingleObject (), in the "new" command and mytime process of creating between synchronization
GetSystemTime (), call for time
To realize the Linux in:
Use fork (,)/execv () to create a process to run the program
Using pro (), waiting for a new process of creating
Gettimeofday (), calls for time
(系统自动生成,下载前可以参看下载内容)
下载文件列表
linux\exec
.....\exec.c
.....\hello
.....\hello.c
windows\mytime.exe
.......\hello.exe
.......\Debug\vc60.idb
.......\.....\vc60.pdb
.......\.....\mytime.pch
.......\.....\mytime.obj
.......\.....\hello.pch
.......\.....\hello.obj
.......\.....\hello.ilk
.......\.....\hello.exe
.......\.....\hello.pdb
.......\mytime.ncb
.......\mytime.plg
.......\hello.ncb
.......\hello.plg
.......\123.h
.......\mytime.cpp
.......\mytime.opt
.......\mytime.dsp
.......\mytime.dsw
.......\hello.dsp
.......\hello.cpp
.......\hello.opt
.......\hello.dsw
.......\Debug
linux
windows
.....\exec.c
.....\hello
.....\hello.c
windows\mytime.exe
.......\hello.exe
.......\Debug\vc60.idb
.......\.....\vc60.pdb
.......\.....\mytime.pch
.......\.....\mytime.obj
.......\.....\hello.pch
.......\.....\hello.obj
.......\.....\hello.ilk
.......\.....\hello.exe
.......\.....\hello.pdb
.......\mytime.ncb
.......\mytime.plg
.......\hello.ncb
.......\hello.plg
.......\123.h
.......\mytime.cpp
.......\mytime.opt
.......\mytime.dsp
.......\mytime.dsw
.......\hello.dsp
.......\hello.cpp
.......\hello.opt
.......\hello.dsw
.......\Debug
linux
windows