代码搜索结果

找到约 10,000 项符合 PID 的代码

figc.7

#include "apue.h" static void f1(void), f2(void); int main(void) { f1(); f2(); _exit(0); } static void f1(void) { pid_t pid; if ((pid = vfork()) < 0) err_sys("vfork error"); /* child and p

fig1.10

#include "apue.h" #include static void sig_int(int); /* our signal-catching function */ int main(void) { char buf[MAXLINE]; /* from apue.h */ pid_t pid; int status; if (signal(SI

orphan3.c

#include "apue.h" #include static void sig_hup(int signo) { printf("SIGHUP received, pid = %d\n", getpid()); } static void pr_ids(char *name) { printf("%s: pid = %d, ppid = %d, pgrp = %d

shell2.c

#include "apue.h" #include static void sig_int(int); /* our signal-catching function */ int main(void) { char buf[MAXLINE]; /* from apue.h */ pid_t pid; int status; if (signal(SI

vfork3.c

#include "apue.h" static void f1(void), f2(void); int main(void) { f1(); f2(); _exit(0); } static void f1(void) { pid_t pid; if ((pid = vfork()) < 0) err_sys("vfork error"); /* child and p

daemonize.c

#include "apue.h" #include #include #ifdef BSD #include #endif #include void daemonize(const char *cmd) { int i, fd0, fd1, fd2; pid_t pid; struct

deadlock.c

#include "apue.h" #include static void lockabyte(const char *name, int fd, off_t offset) { if (writew_lock(fd, offset, SEEK_SET, 1) < 0) err_sys("%s: writew_lock error", name); printf("

init.c

#include "apue.h" #include #include #include void daemonize(const char *cmd) { int i, fd0, fd1, fd2; pid_t pid; struct rlimit rl; struct sigaction sa

find_dtpid.m

function [Kp, Ki, Kd, Kdu3, Kde, N, Ts] = find_DTPID(gains,N,Ts) %% Given gains as [Kp Ki Kd] and N, Ts, this program, where %% N>=100 in general, Ts is the sampling time in seconds, this %% progra

wait.c

/* * linux/lib/wait.c * * (C) 1991 Linus Torvalds */ #define __LIBRARY__ #include #include _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) pid_t wait(i