I saw that rosbag is multithreaded but I was not too aware that fork() without exec() is dangerous in that case. Anyway, I try fork()/exec() combination and it works fine.