代码搜索结果
找到约 10,000 项符合
PID 的代码
wait.c
/*
* linux/lib/wait.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#define __LIBRARY__
#include
#include
_syscall3(pid_t,waitpid,pid_t,pid,int *,w
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
current_pi.asm
**************************************
; File name: current_pi.asm
; Module names: i_pi_reg
;Initialization routines: init_i_pi_reg
;Description: PI current regulator with
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("
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
fig14.7
#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("
fig13.1
#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
fig9.11
#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