代码搜索结果
找到约 10,000 项符合
PID 的代码
exinterface.cpp
#include "stdafx.h"
#include "GameObj.h"
#include "callback_functions.h"
#include "gamelogic.h"
CGameLogic* LogicEngine ;
/*
* 游戏初始化
*/
extern "C" _declspec(dllexport) void StartGame(int
wait.h
/* sys/wait.h -- POSIX header
Copyright 1992, Gimpel Software, All Rights Reserved
*/
#if defined(_lint) && !defined(__WAIT_H)
#define __WAIT_H
#define WEXITSTATUS 1
#define WIFEX
unistd.h
/* unistd.h -- POSIX header
Copyright 1992, Gimpel Software, All Rights Reserved
*/
#if defined(_lint) && !defined(__UNISTD_H)
#define __UNISTD_H
#define R_OK 1
#define W_OK 2
wait.c
#define __LIBRARY__
#include
#include
_syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)
pid_t wait(int * wait_stat)
{
return waitpid(-1,wait_stat,0);
}
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