Re: How to call system command



On Sun, Oct 22, 2000 at 06:22:55PM +0800, Terry Ha wrote:
> 
>    Hi,
> 
>    I want to write a GTK+ application that utilize the "IPCHAINS".  I
>    want to know how to call system command, such as "ipchains -A input -d
>    192.168.1.1 -j DENY" and "clear".  Pls answer this question, because
>    it is urgent.
> 
>    Thanks,

The easiest way would probably to use the system() function. Like:
	system( "/bin/ls" );

Another way is through the exec[*] system calls.

Hope this helps,
--sea




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]