Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux¶à½ø³Ì¶àÏß³ÌÎÊÌâ

ÕâÀïΪʲô×Ó½ø³Ì´´½¨µÄÏß³ÌIDÏàͬµÄ£¿
C/C++ code:
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>


static int temp;
void
thread1 (void *arg)
{
pthread_t thid = pthread_self ();
printf ("thread1 Current thread's ID is %d \n", (int) thid);
printf ("thread1 ends\n");
}
void
thread3 (void *arg)
{
pthread_t thid = pthread_self ();
printf ("thread3 Current thread's ID is %d \n", (int) thid);
printf ("thread3 ends\n");
}

void
thread2 (void *arg)
{
pthread_t thid = pthread_self ();
printf ("thread2 Current thread's ID is %d\n", (int) thid);
printf ("thread2 ends\n");
}
void createthread()
{
pthread_t thid1,thid2;
if(pthread_create(&thid1, NULL, thread1, NULL) != 0) {
printf("thread creation failed\n");
exit(1);
}
if(pthread_create(&thid2, NULL, thread2, NULL) != 0) {
printf("thread creation failed\n");
exit(1);
}
}

int
main()
{
pid_t status;
int i,j;
printf ("Process Creation Study ppid= %d,pid=%d\n",getppid(),getpid());
for (i = 0; i < 4; i++)
{
status = fork ();
sleep (2);
if (status == 0)
{
printf ("Child process is running,CurPid is %d,P


Ïà¹ØÎÊ´ð£º

ʹÓÃStruts2ÉÏ´«Îļþ£¬ÔÚlinuxϱ¨´í

ʹÓÃStruts2ÉÏ´«Îļþ£¬ÔÚlinuxϱ¨´í
2009-09-29 14:56:20,801 [org.apache.struts2.interceptor.FileUploadInterceptor]-[ERROR] Processing of multipart/form-data request failed. c:/temp/upload__1dcd07ee_12 ......

Linux ½ø³ÌÎÊÌâ

linux Ͻø³Ì´´½¨¡£
ʹÓÃvfork() º¯Êý´´½¨ÁË×Ó½ø³Ìºó£¬×Ó½ø³ÌÏÈÐÐÖ´ÐУ¬ÔÚ×Ó½ø³Ìµ÷ÓÃexit»òexec֮ǰ¸¸½ø³Ì´¦ÓÚʲô״̬£¿£¿
²»ÖªµÀ£»Ê×ÏÈδ±ØÊÇ×Ó½ø³ÌÏÈÖ´ÐУ»µÚ2¸¸½ø³ÌÒ²´¦ÓÚÖ´ÐÐ״̬£»ÖÁÓÚ¸¸½ø³Ìµ½µ××öʲô£»¿´´ ......

¸ü¸ÄlinuxĿ¼

Ó¦ÓÃϵͳÊǰ²×°ÔÚ /opt Ŀ¼Ï£¬/opt Ŀ¼ÊÇÊôÓÚ¸ùĿ¼ / ϵġ£ÁíÍâÒ»¸öÎļþϵͳµÄ¹ÒÔØµãÊÇÔÚ/aaaĿ¼Ï£¬¿É·ñ½«/optĿ¼ÏµÄËùÓÐÎļþcopyµ½/aaaĿ¼Ï£¬umount ÔÚ/aaaĿ¼ÏµĹÒÔØµã£¬½«/aaa¸ÄÃû/optĿ¼£¬ÔÙ½«Ô­À ......

linuxÏÂÔõÑùÈÃ×Ô¼ºÐ´µÄ³ÌÐòÔÚÈκÎĿ¼¶¼¿ÉÒÔÓÃ

ÔÚlinuxÏÂдµÄһЩС³ÌÐòºÍ½Å²½£¬Ã¿´ÎÒªÔËÐж¼ÓÐÇл»µ½ËüËùÔÚµÄĿ¼£¬
ÔõÑùÈÃËüÔÚÆäËûĿ¼Ҳ¿ÉÒÔÓÃÄØ£¿¾ÍÈçÓÃvi»òlsÕâЩÃüÁîÒ»Ñù
³¢ÊÔ¹ýÌí¼Ó»·¾³±äÁ¿£¬µ«²»³É¹¦£¬²»¶®
ûÓÐÈ˻شð

ÏñviÄÇЩ£¬ËüÃÇËùÔÚµÄĿ¼¶¼Å ......

linuxÈ¡µÃ½ø³ÌÊýÄ¿

ÔÚlinux»·¾³Ï£¬ÈçºÎÓÃCÓïÑÔÈ¡µÃϵͳµ±Ç°½ø³ÌµÄ×ÜÊý£¿
systemµ÷ÓÃÍⲿÃüÁîps -ef | wc -l µÄ¾ÍÃâ̸ÁË£¬Õâ¸öÎÒ»á
ÄÇ lzÏëÔÚÓû§¿Õ¼ä×ö»¹ÊÇÄÚºË̬×öÄØ£¿
Óû§¿Õ¼äÎÒµÄÏë·¨ÊÇͳ¼Æ/procĿ¼ÏÂÓм¸¸öÊý×ÖÎļþ¼Ð
µ±È» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ