Createprocess
所属分类:Windows编程
开发工具:Visual C++
文件大小:1311KB
下载次数:331
上传日期:2010-05-09 16:57:21
上 传 者:
shingtou
说明: 创建进程
文件包含在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 (7341, 2010-04-07)
linux\exec.c (954, 2010-04-07)
linux\hello (6096, 2010-04-07)
linux\hello.c (66, 2010-04-07)
windows\mytime.exe (512081, 2010-04-07)
windows\hello.exe (155728, 2010-04-07)
windows\Debug\vc60.idb (197632, 2010-04-13)
windows\Debug\vc60.pdb (135168, 2010-04-13)
windows\Debug\mytime.pch (186996, 2010-04-13)
windows\Debug\mytime.obj (164266, 2010-04-13)
windows\Debug\hello.pch (3569604, 2010-04-13)
windows\Debug\hello.obj (11419, 2010-04-13)
windows\Debug\hello.ilk (161132, 2010-04-13)
windows\Debug\hello.exe (155762, 2010-04-13)
windows\Debug\hello.pdb (320512, 2010-04-13)
windows\mytime.ncb (41984, 2010-04-13)
windows\mytime.plg (914, 2010-04-13)
windows\hello.ncb (41984, 2010-04-13)
windows\hello.plg (745, 2010-04-13)
windows\123.h (0, 2010-04-13)
windows\mytime.cpp (1369, 2010-04-13)
windows\mytime.opt (48640, 2010-04-13)
windows\mytime.dsp (3463, 2010-04-13)
windows\mytime.dsw (537, 2010-04-13)
windows\hello.dsp (3389, 2010-04-13)
windows\hello.cpp (107, 2010-04-13)
windows\hello.opt (48640, 2010-04-13)
windows\hello.dsw (535, 2010-04-13)
windows\Debug (0, 2010-04-13)
linux (0, 2010-04-07)
windows (0, 2010-04-06)
近期下载者:
相关文件:
收藏者: