A problem about the kernel to schedule the clone process.(See the test program)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: A problem about the kernel to schedule the clone process.(See the test program)

hi!
          When it run in several times,the result is different. Especially the last "printf" in main function,it did twice.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[xfhu@pg62server xfhu]$ gcc -static -o loop1 loop1.c
[xfhu@pg62server xfhu]$ ./loop1
hello
test1 hello
p1: 14074
test2
p2: 0
14074 , 14075
[xfhu@pg62server xfhu]$ ./loop1
hello
test1 hello
p1: 14077
test2
p2: 0
14077 , 14078
[xfhu@pg62server xfhu]$ ./loop1
hello
14080 , 14081
14080 , 14081
test1 hello
p1: 14080
test2
p2: 14081

<<loop1.c>>

Attachment: loop1.c
Description: Binary data


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux