[so] Test? + Other things

so@cursuri.cs.pub.ro so@cursuri.cs.pub.ro
Sun, 21 Nov 2004 21:15:22 +0000


1.
a) dlsym (RTLD_NEXT, "read"); si la fel pentru write
b) am incercat numai cu handle (dlopen+dlclose)
Faceam chestia asta unde suprascriam functia read si respectiv write

de fiecare data : 
cat: README: Bad address
asta dupa ce facea niste r/w

apoi am incercat sa fac ambele chestii altfel : dlsym in functia de initializare a librariei si dlclose la exit si nimic sau Segmentation Fault ( tot dupa cateva r/w)

daca rulez ps:
Signal 11 (SEGV) caught by ps (procps version 3.1.15). (tot dupa cateva r/w)

Imi explica si mie careva de ce ???
Fac eu ceva ce n-ar trebui?

2.
in alta ordine de idei am "incercat" testul de pe site.
bash-2.05b# ./test README fis_out.txt 1000 1000

dupa o multime de r/w, am constat ca de fapt fiind acelasi pid, IoStart si IoStop se cam suprascriu ...
Adica:
libtip.c: 113 LIB >>> read pid=4943...
libtip.c: 117 LIB >>> read iostart=2519406...
libtip.c: 124 LIB >>> read trimis mesaj _2__4943_2519406_...
libtip.c: 145 LIB >>> read iostop=2519406...
libtip.c: 152 LIB >>> read trimis mesaj _3__4943_2519406_...

libtip.c: 170 LIB >>> write pid=4943...
libtip.c: 174 LIB >>> write iostart=2519406...
libtip.c: 182 LIB >>> write trimis mesaj _2__4943_2519406_...
libtip.c: 204 LIB >>> write iostop=2519406...
libtip.c: 212 LIB >>> write trimis mesaj _3__4943_2519406_...

libtip.c: 113 LIB >>> read pid=4943...
libtip.c: 117 LIB >>> read iostart=2519406...
libtip.c: 124 LIB >>> read trimis mesaj _2__4943_2519406_...
libtip.c: 145 LIB >>> read iostop=2519407...
libtip.c: 152 LIB >>> read trimis mesaj _3__4943_2519406_...

libtip.c: 170 LIB >>> write pid=4943...
libtip.c: 174 LIB >>> write iostart=2519407...
libtip.c: 182 LIB >>> write trimis mesaj _2__4943_2519406_...
libtip.c: 204 LIB >>> write iostop=2519407...
libtip.c: 212 LIB >>> write trimis mesaj _3__4943_2519406_...

Daca se termina aici IOTIME o sa fie 0, la fel daca fac interogarea intre ioread si iostop, pentru ca acolo se citesc foarte putine

PS:  Subscriu la Ideea cu inca o zi la deadline :D