fork compare to exec in linux c program
pid_t pid=fork()
it has 3 situation for the return result pid
0 child
>0 parent process
<0 fork fail
fork create a new process and it parent live alse when the child process had been created
相关文档:
# uname -a # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue # 查看操作系统版本
# cat /proc/cpuinfo # 查看CPU信息
# hostname&nb ......
HowTo WebCam On Linux
Five fun ways to use a Linux webcam
http://www.linux.com/archive/articles/126186
The Webcam HOWTO
http://tldp.org/HOWTO/html_single/Webcam-HOWTO/
WebCam under Linux
http://www.seismo.ethz.ch/linux/webcam.html
‘Webcams in Linux, Part 1
http://www.linuxplanet. ......
1 shutdown:
[NAME
] shutdown - bring the system down
SYNOPSIS
/sbin/shutdown [-t sec] [-arkhncfF] time [warning-message]
DESCRIPTION
shutdown brings the system down in a secure way.&nb ......
一直想写点LINUX中的FORK函数,但是吧,我实在是太懒了,再加上文采不怎么好,所以就从网上找了篇写的不错的文章,看完之后应该对FORK函数有一定的了解~~
给出如下C程序,在linux下使用gcc编译:
1 #include "stdio.h"
2 #include "sys/types.h"
3 #include "unistd.h"
4
5 int main()
6 ......
1. linux 图形化界面乱码,一般是因为没有安装中文字体导致,可以在终端查询已经安装的字体 rpm -qa | grep fonts
如果没有font-chinese,可以下载或从安装盘中找到 fonts-chinese-3.02-12.el5.noarch.rpm 安装即可。
2. 远程连接中文乱码:
vi /etc/sysconfig/i18n
将内容改为
LANG="zh_CN. ......