|
发表于 2004-1-2 20:00:07
|
显示全部楼层
最初由 devel 发表
:thank
看来不能同时幅值
在C就行。
pid_t pid;
if((pid=fork())>0)
想不到这里PERL比C还限制.
the return value are different for System call in Perl from C.
From man perlfunc:
In general, functions in Perl that serve as wrappers for
system calls of the same name (like chown(2), fork(2),
closedir(2), etc.) all return true when they succeed and
"undef" otherwise, as is usually mentioned in the descrip-
tions below. This is different from the C interfaces,
which return "-1" on failure. Exceptions to this rule are
"wait", "waitpid", and "syscall". System calls also set
the special $! variable on failure. Other functions do
not, except accidentally. |
|