system() not working properly after moving to uClibc

Denys Vlasenko vda.linux at googlemail.com
Thu Nov 6 21:43:15 UTC 2008


On Thursday 06 November 2008 17:53, mzhang wrote:
> It is almost impossible to post the C/C++ code and the build system 
> because there are millions of lines of code (proprietary and open 
> source) on a commercial product.

You run million-lines-of-code multithreaded program on MIPS?

> That being said, I did want to post the "strace" results. However, I am 
> not so sure how the "strace" works with a multi-threaded program. I 
> believe when I ran "strace" with our program, the outputs were only for 
> the main thread.

strace --help:
...
-f -- follow forks, -ff -- with output into separate files
-F -- attempt to follow vforks
...

> But the problem is once our main thread finished  
> creating other threads, it went to sleep. That is where I could not see 
> any more outputs from other threads with "strace".

Anyway, I asked about *example program*, I did not mean
"show me your production software under strace". Like:

int main() {
	system("/bin/echo HELLO");
	return 0;
}

--
vda



More information about the uClibc mailing list