Brethern,
working on all the suggestions I noticed that after about a minute or so, my script continued, meaning that $prog finished! That was of course good news, but still I needed to figure out why it didn't do the job in a fraction of a second!
When I started
strace -p <pid of $prog>(suggested by
McMagnus) I saw what the problem was, $prog was writing data to files at a very slow speed.
Changing the working directory of my program to a different disk solved the problem!!
I have 3 internal IDE disks, so I did a performance test on this disk, like
time dd if=/dev/zero bs=1024k count=2048 of=bigfile
and the result was acceptable 15MB/sec ( $prog creates a couple of files with a total size of +/-30KB)
So, although I have still a couple of
whys, I consider the problem as
solved!!
Thanx a lot!
LuCa