代码搜索:fork
找到约 4,354 项符合「fork」的源代码
代码结果 4,354
www.eeworm.com/read/198623/7919867
c system.c
system(str)
char *str;
{
int status;
if(fork() == 0)
execl("/bin/sh", "sh", "-c", str, 0);
wait(&status);
}
www.eeworm.com/read/198616/7922813
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/198616/7922905
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/198616/7922915
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/198616/7922922
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/198616/7923455
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/198616/7923727
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/398610/7933722
cc execvp.cc
#include
using namespace std;
#include
int main()
{
if(fork()!=0){
for(;;){
cerr
www.eeworm.com/read/398610/7933739
cc execl.cc
#include
using namespace std;
#include
int main()
{
if(fork()!=0){
for(;;){
cerr
www.eeworm.com/read/398610/7933765
cc execlp.cc
#include
using namespace std;
#include
int main()
{
if(fork()!=0){
for(;;){
cerr