Running update command using system() function

Hi there ,
I am trying to run update command to install an application say helloworld using library function -> system() but it doesn’t work even the sandoxed is made false .

#########################################
{
char cmd[200];
LE_INFO(“INSTALLING NEW APP\n”);
strcpy(cmd,"/legato/systems/current/bin/update /home/root/helloworld.wp76xx.update");
LE_INFO(“EXECUTING %s\n”,cmd);
system(cmd);
}
#########################################

Please let me know some pointers to overcome this issue .

is it because there is a space after /home/root?

Hi @jyijyi ,
No there is no space after /home/root/

I don’t see problem to install application using system().
system("/legato/systems/current/bin/update /tmp/audioPlaybackRec.wp76xx.update");

root@swi-mdm9x28:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[stopped] batteryService
[running] cellNetService
[running] dataConnectionService
[stopped] dataPushTest
[running] dataRouter
[running] devMode
[stopped] drTool
[running] fwupdateService
[running] gpioService
[running] ledService
[running] modemService
[running] mqttClient
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[stopped] redSensorToCloud
[running] secStore
[stopped] smsInboxService
[stopped] socialService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[stopped] UART_TCP_Demo1
root@swi-mdm9x28:~#
root@swi-mdm9x28:~# update /tmp/hello123.wp76xx.update
Unpacking package: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
Applying update: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
SUCCESS
root@swi-mdm9x28:~#
root@swi-mdm9x28:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[stopped] batteryService
[running] cellNetService
[running] dataConnectionService
[stopped] dataPushTest
[running] dataRouter
[running] devMode
[stopped] drTool
[running] fwupdateService
[running] gpioService
[running] ledService
[running] modemService
[running] mqttClient
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[stopped] redSensorToCloud
[running] secStore
[stopped] smsInboxService
[stopped] socialService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[stopped] UART_TCP_Demo1
[running] hello123
[stopped] audioPlaybackRec

Hi @jyijyi ,
Thanks for the update . Looks weird but it worked for me as well , The reason for failure cases in earlier try is unknown .