代码搜索:fork
找到约 4,354 项符合「fork」的源代码
代码结果 4,354
www.eeworm.com/read/479635/6689538
c main.c
#include
#include
#include
#include
main()
{ pid_t p1,p2,p3;
pid_t t1,t2,t3;
int status;
if ((p1=fork()) == 0) //执行子进程p1的代码
www.eeworm.com/read/476738/6749106
13 fig8.13
#include "apue.h"
static void charatatime(char *);
int
main(void)
{
pid_t pid;
TELL_WAIT();
if ((pid = fork()) < 0) {
err_sys("fork error");
} else if (pid == 0) {
WAIT_PARENT(); /* paren
www.eeworm.com/read/476738/6749142
c zombie.c
#include "apue.h"
#ifdef SOLARIS
#define PSCMD "ps -a -o pid,ppid,s,tty,comm"
#else
#define PSCMD "ps -o pid,ppid,state,tty,command"
#endif
int
main(void)
{
pid_t pid;
if ((pid = fork()) < 0)
e
www.eeworm.com/read/476738/6749145
c tellwait2.c
#include "apue.h"
static void charatatime(char *);
int
main(void)
{
pid_t pid;
TELL_WAIT();
if ((pid = fork()) < 0) {
err_sys("fork error");
} else if (pid == 0) {
WAIT_PARENT(); /* paren
www.eeworm.com/read/476738/6749148
c tellwait1.c
#include "apue.h"
static void charatatime(char *);
int
main(void)
{
pid_t pid;
if ((pid = fork()) < 0) {
err_sys("fork error");
} else if (pid == 0) {
charatatime("output from child\n");
}
www.eeworm.com/read/476738/6749293
9 figc.9
#include "apue.h"
#ifdef SOLARIS
#define PSCMD "ps -a -o pid,ppid,s,tty,comm"
#else
#define PSCMD "ps -o pid,ppid,state,tty,command"
#endif
int
main(void)
{
pid_t pid;
if ((pid = fork()) < 0)
e
www.eeworm.com/read/476738/6749360
12 fig8.12
#include "apue.h"
static void charatatime(char *);
int
main(void)
{
pid_t pid;
if ((pid = fork()) < 0) {
err_sys("fork error");
} else if (pid == 0) {
charatatime("output from child\n");
}
www.eeworm.com/read/476848/6751855
c tellwait1.c
#include
#include "ourhdr.h"
static void charatatime(char *);
int
main(void)
{
pid_t pid;
if ( (pid = fork()) < 0)
err_sys("fork error");
else if (pid == 0) {
charatatime("outp
www.eeworm.com/read/410595/11275999
cpp forkjoin.cpp
#include "forkjoin.h"
Fork::Fork(int n)
: numberOfPorts(n), outPorts(new BufferedTransformation* [n])
{
currentPort = 0;
for (int i=0; i
www.eeworm.com/read/410511/11280493
c 9-3.c
#include
#include
main() {
int pid;
pid = fork();
switch(pid) {
case -1:
perror("fork failed");
exit(1);
case 0:
execl("/bin/ls","ls","-l"