post  Problem with system()

saessie (1)   Link to this post
Hi!

I have encountered a problem using system() in my program.
When using it, for example, system("echo abc") it does nothing. As written in man system, I tried to see what system(NULL) returns; it occured that it returns 0 - so command processor is not available! Is there any way to make it available? Or maybe there is some other operator in C that dows the same - executes any command?

Using Scientific Linux 5.3, gcc version 4.1.2, bash as command interpretor.
Zaita (2112)   Link to this post
Try using exec() instead.

This topic is archived - New replies not allowed.