linux程序和进程入门了解
2012-11-21 15:44
225 查看
程序存放在磁盘上,存储在某个磁盘上的可执行文件,使用6个exec函数中的一个由内核将进程读入存储器.
UNIX为每个进程分配一个唯一的数字标识,称为进车个ID,进程ID总是非负数.
#include<stdio.h>
#include<sys/stat.h>
#include<unistd.h>
int main()
{
int pid = getpid();
printf("the process of this program's pid is %d\n", pid);
return 0;
}
ustcqi@ubuntu:~/workplace/linux/APUE/Demo1$ gcc -o getPID getPID.c
ustcqi@ubuntu:~/workplace/linux/APUE/Demo1$ ./getPID
the process of this program's pid is 6091
UNIX为每个进程分配一个唯一的数字标识,称为进车个ID,进程ID总是非负数.
#include<stdio.h>
#include<sys/stat.h>
#include<unistd.h>
int main()
{
int pid = getpid();
printf("the process of this program's pid is %d\n", pid);
return 0;
}
ustcqi@ubuntu:~/workplace/linux/APUE/Demo1$ gcc -o getPID getPID.c
ustcqi@ubuntu:~/workplace/linux/APUE/Demo1$ ./getPID
the process of this program's pid is 6091
相关文章推荐
- Linux C进程与多线程入门—(4)简单多线程程序
- Linux下进程间共享内存编码方式入门
- linux中程序存储结构和进程的地址空间
- 每天进步一点点——再次了解Linux进程ID
- ADO.NET入门教程(二)了解.NET数据提供程序
- Linux下C程序进程地址空间布局
- Linux Linux程序练习十五(进程间的通信共享内存版)
- linux 如何查看某个程序的进程号
- Linux系统中程序进程对文件的访问权限
- Linux之进程的了解
- Linux中如何让进程(或正在运行的程序)到后台运行?
- Supervisor Linux程序进程管理
- 了解Linux的进程与线程
- Linux中用守护进程检测程序运行
- 【Linux基础】程序与进程
- linux进程知识 程序存储、crontab、fork与vfork、exec、_exit()、wait()与waitpid()、孤儿和僵尸
- Linux操作系统分析之进程的创建与可执行程序的加载
- iftop是一个很好用的实时流量监测程序,跟使用iftop查看linux连接进程占用的实时流量
- Linux C进程与多线程入门—(1)创建进程
- linux操作系统下c语言编程入门--进程介绍