亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? readproc.h

?? linux下獲取一些環境信息的代碼
?? H
字號:
#ifndef PROCPS_PROC_READPROC_H#define PROCPS_PROC_READPROC_H// New Interface to Process Table -- PROCTAB Stream (a la Directory streams)// Copyright 1996 Charles L. Blake.// Copyright 1998 Michael K. Johnson// Copyright 1998-2003 Albert Cahalan// May be distributed under the terms of the// GNU Library General Public License, a copy of which is provided// in the file COPYING#include "procps.h"#include "pwcache.h"#define SIGNAL_STRINGEXTERN_C_BEGIN// ld	cutime, cstime, priority, nice, timeout, alarm, rss,// c	state,// d	ppid, pgrp, session, tty, tpgid,// s	signal, blocked, sigignore, sigcatch,// lu	flags, min_flt, cmin_flt, maj_flt, cmaj_flt, utime, stime,// lu	rss_rlim, start_code, end_code, start_stack, kstk_esp, kstk_eip,// lu	start_time, vsize, wchan,// This is to help document a transition from pid to tgid/tid caused// by the introduction of thread support. It is used in cases where// neither tgid nor tid seemed correct. (in other words, FIXME)#define XXXID tid// Basic data structure which holds all information we can get about a process.// (unless otherwise specified, fields are read from /proc/#/stat)//// Most of it comes from task_struct in linux/sched.h//typedef struct proc_t {// 1st 16 bytes    int        tid,		// (special)       task id, the POSIX thread ID (see also: tgid)    	ppid;		// stat,status     pid of parent process    unsigned        pcpu;           // stat (special)  %CPU usage (is not filled in by readproc!!!)    char    	state,		// stat,status     single-char code for process state (S=sleeping)    	pad_1,		// n/a             padding    	pad_2,		// n/a             padding    	pad_3;		// n/a             padding// 2nd 16 bytes    unsigned long long	utime,		// stat            user-mode CPU time accumulated by process	stime,		// stat            kernel-mode CPU time accumulated by process// and so on...	cutime,		// stat            cumulative utime of process and reaped children	cstime,		// stat            cumulative stime of process and reaped children	start_time;	// stat            start time of process -- seconds since 1-1-70#ifdef SIGNAL_STRING    char	// Linux 2.1.7x and up have 64 signals. Allow 64, plus '\0' and padding.	signal[18],	// status          mask of pending signals, per-task for readtask() but per-proc for readproc()	blocked[18],	// status          mask of blocked signals	sigignore[18],	// status          mask of ignored signals	sigcatch[18],	// status          mask of caught  signals	_sigpnd[18];	// status          mask of PER TASK pending signals#else    long long	// Linux 2.1.7x and up have 64 signals.	signal,		// status          mask of pending signals, per-task for readtask() but per-proc for readproc()	blocked,	// status          mask of blocked signals	sigignore,	// status          mask of ignored signals	sigcatch,	// status          mask of caught  signals	_sigpnd;	// status          mask of PER TASK pending signals#endif    unsigned KLONG	start_code,	// stat            address of beginning of code segment	end_code,	// stat            address of end of code segment	start_stack,	// stat            address of the bottom of stack for the process	kstk_esp,	// stat            kernel stack pointer	kstk_eip,	// stat            kernel instruction pointer	wchan;		// stat (special)  address of kernel wait channel proc is sleeping in    long	priority,	// stat            kernel scheduling priority	nice,		// stat            standard unix nice level of process	rss,		// stat            resident set size from /proc/#/stat (pages)	alarm,		// stat            ?    // the next 7 members come from /proc/#/statm	size,		// statm           total # of pages of memory	resident,	// statm           number of resident set (non-swapped) pages (4k)	share,		// statm           number of pages of shared (mmap'd) memory	trs,		// statm           text resident set size	lrs,		// statm           shared-lib resident set size	drs,		// statm           data resident set size	dt;		// statm           dirty pages    unsigned long	vm_size,        // status          same as vsize in kb	vm_lock,        // status          locked pages in kb	vm_rss,         // status          same as rss in kb	vm_data,        // status          data size	vm_stack,       // status          stack size	vm_exe,         // status          executable size	vm_lib,         // status          library size (all pages, not just used ones)	rtprio,		// stat            real-time priority	sched,		// stat            scheduling class	vsize,		// stat            number of pages of virtual memory ...	rss_rlim,	// stat            resident set size limit?	flags,		// stat            kernel flags for the process	min_flt,	// stat            number of minor page faults since process start	maj_flt,	// stat            number of major page faults since process start	cmin_flt,	// stat            cumulative min_flt of process and child processes	cmaj_flt;	// stat            cumulative maj_flt of process and child processes    char	**environ,	// (special)       environment string vector (/proc/#/environ)	**cmdline;	// (special)       command line string vector (/proc/#/cmdline)    char	// Be compatible: Digital allows 16 and NT allows 14 ???    	euser[P_G_SZ],	// stat(),status   effective user name    	ruser[P_G_SZ],	// status          real user name    	suser[P_G_SZ],	// status          saved user name    	fuser[P_G_SZ],	// status          filesystem user name    	rgroup[P_G_SZ],	// status          real group name    	egroup[P_G_SZ],	// status          effective group name    	sgroup[P_G_SZ],	// status          saved group name    	fgroup[P_G_SZ],	// status          filesystem group name    	cmd[16];	// stat,status     basename of executable file in call to exec(2)    struct proc_t	*ring,		// n/a             thread group ring	*next;		// n/a             various library uses    int	pgrp,		// stat            process group id	session,	// stat            session id	nlwp,		// stat,status     number of threads, or 0 if no clue	tgid,		// (special)       task group ID, the POSIX PID (see also: tid)	tty,		// stat            full device number of controlling terminal        euid, egid,     // stat(),status   effective        ruid, rgid,     // status          real        suid, sgid,     // status          saved        fuid, fgid,     // status          fs (used for file access only)	tpgid,		// stat            terminal process group id	exit_signal,	// stat            might not be SIGCHLD	processor;      // stat            current (or most recent?) CPU} proc_t;// PROCTAB: data structure holding the persistent information readproc needs// from openproc().  The setup is intentionally similar to the dirent interface// and other system table interfaces (utmp+wtmp come to mind).#include <sys/types.h>#include <dirent.h>#include <unistd.h>#define PROCPATHLEN 64  // must hold /proc/2000222000/task/2000222000/cmdlinetypedef struct PROCTAB {    DIR*	procfs;//    char deBug0[64];    DIR*	taskdir;  // for threads//    char deBug1[64];    pid_t	taskdir_user;  // for threads    int         did_fake; // used when taskdir is missing    int(*finder)(struct PROCTAB *restrict const, proc_t *restrict const);    proc_t*(*reader)(struct PROCTAB *restrict const, proc_t *restrict const);    int(*taskfinder)(struct PROCTAB *restrict const, const proc_t *restrict const, proc_t *restrict const, char *restrict const);    proc_t*(*taskreader)(struct PROCTAB *restrict const, const proc_t *restrict const, proc_t *restrict const, char *restrict const);    pid_t*	pids;	// pids of the procs    uid_t*	uids;	// uids of procs    int		nuid;	// cannot really sentinel-terminate unsigned short[]    int         i;  // generic    unsigned	flags;    unsigned    u;  // generic    void *      vp; // generic    char        path[PROCPATHLEN];  // must hold /proc/2000222000/task/2000222000/cmdline    unsigned pathlen;        // length of string in the above (w/o '\0')} PROCTAB;// initialize a PROCTAB structure holding needed call-to-call persistent dataextern PROCTAB* openproc(int flags, ... /* pid_t*|uid_t*|dev_t*|char* [, int n] */ );typedef struct proc_data_t {    proc_t **tab;    proc_t **proc;    proc_t **task;    int n;    int nproc;    int ntask;} proc_data_t;extern proc_data_t *readproctab2(int(*want_proc)(proc_t *buf), int(*want_task)(proc_t *buf), PROCTAB *restrict const PT);// Convenient wrapper around openproc and readproc to slurp in the whole process// table subset satisfying the constraints of flags and the optional PID list.// Free allocated memory with exit().  Access via tab[N]->member.  The pointer// list is NULL terminated.extern proc_t** readproctab(int flags, ... /* same as openproc */ );// clean-up open files, etc from the openproc()extern void closeproc(PROCTAB* PT);// retrieve the next process matching the criteria set by the openproc()extern proc_t* readproc(PROCTAB *restrict const PT, proc_t *restrict p);extern proc_t* readtask(PROCTAB *restrict const PT, const proc_t *restrict const p, proc_t *restrict t);// warning: interface may changeextern int read_cmdline(char *restrict const dst, unsigned sz, unsigned pid);extern void look_up_our_self(proc_t *p);// deallocate space allocated by readprocextern void freeproc(proc_t* p);//fill out a proc_t for a single taskextern proc_t * get_proc_stats(pid_t pid, proc_t *p);// openproc/readproctab://// Return PROCTAB* / *proc_t[] or NULL on error ((probably) "/proc" cannot be// opened.)  By default readproc will consider all processes as valid to parse// and return, but not actually fill in the cmdline, environ, and /proc/#/statm// derived memory fields.//// `flags' (a bitwise-or of PROC_* below) modifies the default behavior.  The// "fill" options will cause more of the proc_t to be filled in.  The "filter"// options all use the second argument as the pointer to a list of objects:// process status', process id's, user id's.  The third// argument is the length of the list (currently only used for lists of user// id's since uid_t supports no convenient termination sentinel.)#define PROC_FILLMEM         0x0001 // read statm#define PROC_FILLCOM         0x0002 // alloc and fill in `cmdline'#define PROC_FILLENV         0x0004 // alloc and fill in `environ'#define PROC_FILLUSR         0x0008 // resolve user id number -> user name#define PROC_FILLGRP         0x0010 // resolve group id number -> group name#define PROC_FILLSTATUS      0x0020 // read status -- currently unconditional#define PROC_FILLSTAT        0x0040 // read stat -- currently unconditional#define PROC_FILLWCHAN       0x0080 // look up WCHAN name#define PROC_FILLARG         0x0100 // alloc and fill in `cmdline'#define PROC_LOOSE_TASKS     0x0200 // threat threads as if they were processes// Obsolete, consider only processes with one of the passed:#define PROC_PID             0x1000  // process id numbers ( 0   terminated)#define PROC_UID             0x4000  // user id numbers    ( length needed )// it helps to give app code a few spare bits#define PROC_SPARE_1     0x01000000#define PROC_SPARE_2     0x02000000#define PROC_SPARE_3     0x04000000#define PROC_SPARE_4     0x08000000EXTERN_C_END#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美区一区二| 久久久久久99精品| 欧美亚洲国产一卡| 色女孩综合影院| 欧美中文字幕久久| 欧美日韩黄色影视| 日韩三级在线免费观看| 欧美大片在线观看一区二区| 久久在线观看免费| 国产精品视频免费| 亚洲欧美视频在线观看| 亚洲最新视频在线观看| 亚洲不卡在线观看| 日本vs亚洲vs韩国一区三区二区| 奇米色777欧美一区二区| 久久99最新地址| 国产成人亚洲综合色影视| 成人精品免费看| 91久久精品一区二区三| 欧美丰满一区二区免费视频| 日韩色在线观看| 国产亚洲成aⅴ人片在线观看| 久久精品人人做| 亚洲人精品一区| 香蕉成人啪国产精品视频综合网| 日韩国产精品久久久| 麻豆精品在线播放| 国产高清视频一区| 91丨porny丨中文| 欧美日本乱大交xxxxx| 欧美大片一区二区| 国产精品成人午夜| 亚洲成人中文在线| 国产一区二区三区四区五区入口| 99riav一区二区三区| 欧美午夜不卡视频| 久久久综合网站| 亚洲视频网在线直播| 日本伊人精品一区二区三区观看方式| 国内成+人亚洲+欧美+综合在线| av成人动漫在线观看| 欧美揉bbbbb揉bbbbb| 精品久久久久久久人人人人传媒 | 日韩不卡手机在线v区| 国产曰批免费观看久久久| 91丨九色丨黑人外教| 日韩视频一区在线观看| 亚洲视频 欧洲视频| 久色婷婷小香蕉久久| 99久久亚洲一区二区三区青草| 日韩一区国产二区欧美三区| 中文字幕在线免费不卡| 免费在线观看视频一区| 91老师片黄在线观看| 欧美成人在线直播| 一区二区激情视频| 成人午夜视频在线观看| 日韩一区二区三区免费看| 亚洲精选视频在线| 国产精品系列在线观看| 欧美日本韩国一区二区三区视频 | 久久久一区二区| 天天爽夜夜爽夜夜爽精品视频| 高清免费成人av| 欧美一区二区日韩一区二区| 日韩毛片精品高清免费| 国产一区91精品张津瑜| 欧美日韩国产一级| 亚洲同性gay激情无套| 精品在线亚洲视频| 欧美日韩极品在线观看一区| 中文字幕久久午夜不卡| 九色综合国产一区二区三区| 欧美片在线播放| 综合网在线视频| 从欧美一区二区三区| 精品免费视频一区二区| 日本va欧美va瓶| 在线观看91精品国产麻豆| 亚洲欧美欧美一区二区三区| 成人不卡免费av| 久久久亚洲高清| 精彩视频一区二区| 日韩美女一区二区三区四区| 亚洲成人激情av| 91国产成人在线| 亚洲精品成人在线| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 亚洲精品伦理在线| 成人免费毛片嘿嘿连载视频| 久久久久久一二三区| 精品一区二区免费视频| 欧美成人三级电影在线| 久久不见久久见中文字幕免费| 日韩一区二区三区电影在线观看| 婷婷国产在线综合| 在线成人免费视频| 日韩av成人高清| 欧美一区二区三区免费视频| 日日摸夜夜添夜夜添国产精品| 7777精品伊人久久久大香线蕉| 亚洲.国产.中文慕字在线| 久久久99精品久久| 久久久久久久久久久久久久久99| 精品毛片乱码1区2区3区| 欧美一区午夜精品| 91麻豆产精品久久久久久| 国产激情一区二区三区| 日韩精品一区二区三区四区视频| 国产自产视频一区二区三区| 日本aⅴ免费视频一区二区三区| 国产精品毛片久久久久久| 99久久er热在这里只有精品15| 一区二区高清视频在线观看| 五月天中文字幕一区二区| 欧美性猛交xxxx乱大交退制版| 亚洲午夜av在线| 色网站国产精品| 亚洲成人激情社区| 日韩欧美一级精品久久| 国产一区日韩二区欧美三区| 欧美韩国一区二区| 色乱码一区二区三区88 | 亚洲最大成人综合| 欧美日韩免费在线视频| 蜜臀99久久精品久久久久久软件| 久久婷婷综合激情| 成人精品一区二区三区四区| 一区二区三区四区不卡视频| 91.成人天堂一区| 国产精品91一区二区| 亚洲欧美一区二区三区国产精品| 欧美日韩黄视频| 国产一区二区三区四| 综合久久久久久| 欧美一级精品在线| eeuss国产一区二区三区| 性欧美疯狂xxxxbbbb| 久久久91精品国产一区二区三区| 91麻豆免费观看| 毛片av一区二区| 亚洲三级免费观看| 日韩欧美精品在线| 99r精品视频| 日韩黄色片在线观看| 国产网红主播福利一区二区| 欧美在线色视频| 国产成人鲁色资源国产91色综| 亚洲国产精品一区二区www| 欧美精品一区二区蜜臀亚洲| 色婷婷综合久久久| 国产乱国产乱300精品| 亚洲国产视频在线| 国产欧美视频在线观看| 欧美精品日韩一区| 成人开心网精品视频| 奇米精品一区二区三区四区| 亚洲国产激情av| 欧美一区二区性放荡片| 91蝌蚪国产九色| 激情图片小说一区| 亚洲午夜影视影院在线观看| 中文字幕va一区二区三区| 日韩一级片网站| 欧美日韩中文字幕一区| www.欧美日韩国产在线| 久久疯狂做爰流白浆xx| 亚洲444eee在线观看| 综合久久国产九一剧情麻豆| wwwwxxxxx欧美| 欧美一卡在线观看| 欧美天天综合网| yourporn久久国产精品| 精彩视频一区二区三区 | 欧美日韩国产片| 色综合亚洲欧洲| 成人性生交大片免费看中文网站| 久久www免费人成看片高清| 午夜激情久久久| 亚洲精品视频观看| 日本一二三四高清不卡| 欧美精品一区二区三区在线| 欧美一区二区国产| 欧美日韩国产小视频| 色悠悠久久综合| 99re视频精品| 99久久精品国产一区二区三区| 国产一区二区三区在线观看免费视频| 天堂在线亚洲视频| 亚洲国产精品一区二区www在线| 亚洲欧美日韩综合aⅴ视频| 国产精品成人免费| 国产精品乱子久久久久| 国产人妖乱国产精品人妖| 亚洲精品在线网站| 精品欧美一区二区三区精品久久| 日韩一区二区精品葵司在线| 3atv在线一区二区三区| 91精品国产免费久久综合| 制服.丝袜.亚洲.另类.中文|