Sunday, January 5, 2014

Running another Process inside the C program

There is a function called system( ) to run a process inside a c program.
Protoype:  int system(const char * command)
System( ) executes a command specified in command by calling /bin/sh - c command and returns after the command has been completed.
It returns -1 if there is an error.

example:
system("/etc/init.d/networking stop");

Tags:-system, process,command

No comments:

Post a Comment