On Monday 23 March 2009 18:13:32 Marek Lindner wrote:
I downloaded the OpenWRT trunk and compiled the i386 image before loading it into a qemu environment. I can confirm that batman does nothing if started without a debug level. It seems the main thread is not doing anything. Interestingly, if I compile & run batman on my debian machine it runs without problems. I guess OpenWRT uses some different libs / compile time options / etc that provoke that problem.
Seems to a different behaviour when doing a fork+pthreads_create... somehow. Try to remove the fork and the setgid from posix/init.c:my_daemon and compile it again (against uclib of course). You should notice that it works without any problems. If you do a static build against a current glibc on i386 (2.7 here) it works as expected. So I would guess a uClibc specific behaviour when calling pthread_create after a fork. The thread (unix_listen) itself runs without any problems but the main thread seems to be blocked at pthread_create( &unix_if.listen_thread_id, NULL, &unix_listen, NULL ); in posix/init.c:apply_init_args.
Please read http://www.mail-archive.com/uclibc@uclibc.org/msg00357.html for some hints.
Best regards, Sven