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
Ïà¹ØÎĵµ£º
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 find ÃüÁîʹÓÃ
-name Ñ¡Ïî
ÎļþÃûÑ¡ÏîÊÇfindÃüÁî×î³£ÓõÄÑ¡ÏҪôµ¥¶ÀʹÓøÃÑ¡ÏҪôºÍÆäËûÑ¡ÏîÒ»ÆðʹÓá£
¿ÉÒÔʹÓÃijÖÖÎļþÃûģʽÀ´Æ¥ÅäÎļþ£¬¼ÇסҪÓÃÒýºÅ½«ÎļþÃûģʽÒýÆðÀ´¡£
ÏëÒªµÄµ±Ç°Ä¿Â¼¼°×ÓĿ¼ÖвéÕÒÎļþÃûÒÔÒ»¸ö´óд×Öĸ¿ªÍ·µÄÎļþ£¬¿ÉÒÔÓãº
$ find . -name "[A-Z]*" -print
ÏëÒªÔÚ/etcĿ¼Öв ......
ÔÚʵÏÖÇý¶¯³ÌÐòµÄmmapº¯Êýʱ£¬Òª×¢ÒâÓ³É䵨ַµÄת»»ÎÊÌ⣬¼û´úÂë¡£
¶¨ÒåÒ»¸öÉ豸½á¹¹Ì壺
struct leedriver
{
struct cdev cdev;
unsigned char mem[MEMSIZE];
};
ÕâÀïÃæÕâ¸öMEMSIZE£¬×îС¶¼ÒªÊÇ4096£¬ÒòΪÄÚ´æÓ³ÉäÊÇÒÔҳΪµ¥Î»µÄ¡£
ÔÚʵÏÖsimple_remap_mmapº¯Êýʱ£¬´úÂëÈçÏÂ
static int simple_remap_mmap(stru ......