[dfo@chiffre kbug]$ gdb ./kbug
GNU gdb 6.0-2mdk (Mandrake Linux)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /home/dfo/test/kbug/kbug 
[Thread debugging using libthread_db enabled]
[New Thread 1073961248 (LWP 2532)]
[New Thread 1083698096 (LWP 2535)]

Here GDB is stuck and we have the following:

ps xwaf | grep kbug
 2537 pts16    T      0:00 /home/dfo/test/kbug/kbug
 2531 pts16    S      0:00  |           \_ gdb ./kbug
 2532 pts16    D      0:00  |               \_ /home/dfo/test/kbug/kbug
 2536 pts16    T      0:00  |                   \_ /home/dfo/test/kbug/kbug
 2830 pts17    S      0:00              \_ grep kbug

please note the pid 2537 that is not attached correctly to gdb(looks like something 
bad has happened to him)


#################################################################################################
Sometime i get the following execution
[dfo@chiffre kbug]$ gdb ./kbug
GNU gdb 6.0-2mdk (Mandrake Linux)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) r 5 6 7
Starting program: /home/dfo/test/kbug/kbug 5 6 7
[Thread debugging using libthread_db enabled]
[New Thread 1073961248 (LWP 5060)]
[New Thread 1083698096 (LWP 5064)]
Detaching after fork from child process 5065.
waiting for new child: No child processes.
(gdb) 

with
 ps xwaf | grep kbug
 5066 pts16    T      0:00 /home/dfo/test/kbug/kbug 5 6 7
 5045 pts16    S      0:00  |           \_ gdb ./kbug
 5060 pts16    T      0:00  |               \_ /home/dfo/test/kbug/kbug 5 6 7
 5276 pts17    S      0:00              \_ grep kbug

if i continue in gdb:
(gdb) c
Continuing.
main(1073961248): tlsData=1

Here gdb is stuck and we have:
 ps xwaf | grep kbug
 5066 pts16    T      0:00 /home/dfo/test/kbug/kbug 5 6 7
 5045 pts16    S      0:00  |           \_ gdb ./kbug
 5060 pts16    T      0:00  |               \_ /home/dfo/test/kbug/kbug 5 6 7
 5721 pts16    T      0:00  |                   \_ /home/dfo/test/kbug/kbug 5 6 7
 5723 pts17    S      0:00              \_ grep kbug

After a killall -9 gdb:
ps xwaf | grep kbug
 6234 pts17    S      0:00              \_ grep kbug
 5060 pts16    D      0:00 /home/dfo/test/kbug/kbug 5 6 7
 5066 pts16    Z      0:00  \_ [kbug] <defunct>
 5721 pts16    T      0:00  \_ /home/dfo/test/kbug/kbug 5 6 7

a killall -9 kbug do clean everything
