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
Ïà¹ØÎĵµ£º
Ò»¡¢ÒýÑÔ£º
±¾ÎĵµµÄÄÚÈݴ󲿷ÝÄÚÈݶ¼ÊÇ´ÓÍøÉÏÊÕ¼¯¶øÀ´£¬È»ºóÅäºÏһЩеĽØÍ¼£¨Äں˰汾£ºV2.4.19£©¡£ÔÚÿһÅäÖÃÏîºó»áÓÐÒ»¸öÑ¡ÔñÖ¸ÄϵIJ¿·Ý£¬ÓÃÀ´Ö¸µ¼´ó¼ÒÔõôÑù¸ù¾Ý×Ô¼ºµÄÇé¿öÀ´×öÏàÓ¦µÄÑ¡Ôñ£»»¹ÓÐÔÚÿһ¸ö´óÏîºÍÎĵµµÄ×îºó»áÓÐÒ»¸ö¾Ñé̸£¬ËüÊÇһЩ¸ßÊÖÃÇÔÚÓ¦¶ÔÎÊÌâºÍ´¦ÀíÌØÓÐÓ²¼þʱµÄһЩ¾Ñ飨Õâ¸ö»¹µ ......
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º¯Êý,µ«ÊǰÉ,ÎÒʵÔÚÊÇÌ«ÀÁÁË,ÔÙ¼ÓÉÏÎIJɲ»ÔõôºÃ,ËùÒԾʹÓÍøÉÏÕÒÁËÆªÐ´µÄ²»´íµÄÎÄÕÂ,¿´ÍêÖ®ºóÓ¦¸Ã¶ÔFORKº¯ÊýÓÐÒ»¶¨µÄÁ˽â~~
¸ø³öÈçÏÂC³ÌÐò£¬ÔÚlinuxÏÂʹÓÃgcc±àÒ룺
1 #include "stdio.h"
2 #include "sys/types.h"
3 #include "unistd.h"
4
5 int main()
6 ......
¼ò½é
Basic ÊÇʹÓõÄ×î¹ã·ºµÄ¡¢×î¼òµ¥µÄ±à³ÌÓïÑÔÖ®Ò»£¬ÓÈÆäÊǶÔÓÚÐÂÊÖ¡£ Æù½ñΪֹ£¬×î³£ÓÃµÄ Basic ¿ª·¢»·¾³ÊÇ Microsoft µÄ Visual Basic ¼¯³É¿ª·¢»·¾³¡£ ½üÀ´£¬Linux µÄʹÓ÷¶Î§ÒѾÑÓÉìµ½ÁË×ÀÃæ»·¾³¡£´Ó×î³õµÄ½öÏÞÓÚ·þÎñÆ÷Ó¦Óã¬Ê¹µÃÈ˶¼ÊÇÁìµ¼Õߣ¬ËüÕýÔÚ±ä³ÉÒ»¸ö¿Í»§¶Ë¼ÆËã»úµÄ²Ù×÷ϵͳ£¬Âú×ãÁËÀàËÆÔĶÁµç×ÓÓʼþ¡¢ÉÏÍø ......