Hello Guru's,

Today I wrote a simple application in Linux.
The simple app will execute a wget command with an argument.

The command string looks like as given below.

wget -O 0_lr.xml -d -S -T 2 --tries=1 --waitretry=0 --header="Content-Type: text/xml" --header="SOAPAction:http://schemas.microsoft.com/" --post-file=0_lc.xml ""

The intention of this command to make sure that the retry in wget should execute only once when failure noted.

When I execute this command in a terminal (CentOS 7 Terminal) I got correct result.

But when I execute the same command via system() api call in a C program then I am not getting the correct result.
ie:- wget default retry attempt is 20 and it tries 20 times instead of 1.

The wget version along with my CentOS 7 is 1.14.

What is the special things I should take care when use system() API.?

Kindly help !.