I am getting errno:10 No child process error while using system() command. I tried doing wait(NULL) in parent but could not get success.
Can you please suggest me a way to resolve this error. Its urgent.
This code isn't complete (many variables like stat, prcfre, and pid are undeclared), so I imagine there are all sorts of things that might go wrong with those declarations; but I think the main problem is that the syntax for your df command is wrong. That "%s" looks like it's intended to be a replaceable parameter -- i.e., a format string for the sprintf() command. You're not replacing the parameter with anything, though, and so df is going to fail. The "no child process" could definitely come from that.
So do you want df to report the usage of a particular filesystem, or all filesystems, or what?