Skip to main content


Showing posts from October, 2007
Siri Bercakap dengan fork()

**salinan boleh dimuat turun di sini [PDF]

Bahasa aturcara seperti C/C++ menyokong penciptaan satu proses baru iaitu fork(). Set
arahan fork() akan mencipta satu proses baru iaitu child dan proses asal tadi disebut
parent dengan syarat tertentu. Secara umumnya, syarat yang ditentukan ialah;
Fork ID Kondisi
<0 Fork gagal
0 Ini ialah child
>0 Ini ialah parent

Saya sertakan satu program lengkap (rujuk apendiks) yang anda boleh salin dan cuba
sendiri untuk memahami aliran fork() ini.
Untuk membolehkan kita “menyaring” PID, PPID dan pepohon proses (process tree)
program kita ini, kita boleh meletakkan arahan sleep(nilai saat) dan juga menggunakan
pstree untuk melihat aliran proses parent dan child tadi.
Andaikan nama program tersebut “myfork.cpp” dan selepas kompilasi menjadi “myfork”
g++ myfork.cpp -o myfork
Rajah 1 : Menggunakan pengkompil GNU C++ untuk mengompil aturcara C++

Sekarang kita larikan aturcara “myfork” ini:
Everybody Loves "Ravmon.exe"

root@syncronix:/media/disk# clamscan
/media/disk/taiping.cpp: OK
/media/disk/RavMonE.exe: Worm.RJump-2 FOUND
/media/disk/ch9-doubleAreaSelfInput.cpp: OK
/media/disk/ch9-height_address.cpp: OK
/media/disk/sectionCquiz1.cpp: OK
/media/disk/string.pdf: OK
/media/disk/bm-and-kmp-cpu.png: OK
/media/disk/ch9-doubleArea.cpp: OK
/media/disk/bm-kmp.gnu: OK
/media/disk/ch9-doubleArea.exe: OK
/media/disk/ch9-doubleAreaSelfInput.exe: OK
/media/disk/msvcr71.dll: OK
/media/disk/classes-lab-exercises.doc: OK
/media/disk/RavMonLog: OK
/media/disk/lab-exec-b4-finale.doc: OK
/media/disk/matrix2.c: OK
/media/disk/matrix2.cpp: OK
/media/disk/matrix-lab-exec.cpp: OK
/media/disk/lab xcersise(1c).cpp: OK

----------- SCAN SUMMARY -----------
Known viruses: 160515
Engine version: 0.91.2
Scanned directories: 1
Scanned files: 19
Infected files: 1
Data scanned: 4.66 MB
Time: 7.369 sec (0 m 7 s)

root@syncronix:/media/disk# clamscan --remove
/media/disk/taiping.cpp: OK
/media/disk/RavMonE.exe: Worm.RJump-…

Udang was not a choice.

So I believe I am not the seafood type of person. Since I tried to eat those prawns and I only managed to eat two (or more?). I guess I only have much appetite on kepah, kupang and kerang alike.

Of course the most obvious all those meats and sliced chickens were in the first place. It just doesn't matter how long the time elapsed but it seems the human's stomach contains the extra dimension which allows you to eat a lot for such a long time.
Tuxpaint, Massachusetts and ms_MY

I was pointed to Google Code search by papit who did several developments hosted on Google Code's website. It turns out I also found my name within the search results. One of the project hosted by MIT. I wonder how it feel if I myself graduated from MIT. LoL. (evil laugh).
The tuxpaint translation file that I mentioned is being hosted here.
I believe when the time come, I'll also contribute in the software development as well.