fork()在linux,c里面是开启新的进程:
SYNOPSIS
#include <sys/types.h>
#include <unistd.h> pid_t fork(void);DESCRIPTION
fork creates a child process that differs from the parent process only
in its PID and PPID, and in the fact that resource utilizations are set
to 0. File locks and pending signals are not inherited. Under Linux, fork is implemented using copy-on-write pages, so the only
penalty incurred by fork is the time and memory required to duplicate
the parent's page tables, and to create a unique task structure for the
child.RETURN VALUE
On success, the PID of the child process is returned in the parent's
thread of execution, and a 0 is returned in the child's thread of exe-
cution. On failure, a -1 will be returned in the parent's context, no
child process will be created, and errno will be set appropriately.
SYNOPSIS
#include <sys/types.h>
#include <unistd.h> pid_t fork(void);DESCRIPTION
fork creates a child process that differs from the parent process only
in its PID and PPID, and in the fact that resource utilizations are set
to 0. File locks and pending signals are not inherited. Under Linux, fork is implemented using copy-on-write pages, so the only
penalty incurred by fork is the time and memory required to duplicate
the parent's page tables, and to create a unique task structure for the
child.RETURN VALUE
On success, the PID of the child process is returned in the parent's
thread of execution, and a 0 is returned in the child's thread of exe-
cution. On failure, a -1 will be returned in the parent's context, no
child process will be created, and errno will be set appropriately.
解决方案 »
- 菜鸟求助:java线程中的等待唤醒。没怎么理解到!
- 已知一个路径,如何判断其是否为文件?
- 关于springsecurity的cas配置
- hibernate做单表查询也会发生"lazyinitializationexception "?
- XFire 中动态客户端Client返回值问题请教....
- 关于EJB的调用(在线等,急啊!!!!)
- WSDLException
- 我们要开题了,能否帮我选个题
- jb9中连接数据库sql server2000(struts1.1)
- 那里有Solaris的中文资料可以参考啊?和J2EE有关系更好啊
- jbx中利用struts,第一个页面怎么出不来啊
- 这样使用JMS,能不能实现,为什么(高分求救)
或者一个新的 javac.exe 进程
或者...