Stopping an application

To stop an application from your window manager, you need to publish (using a write() call) a stop command to the PPS launcher control object.

Publish stop command to the PPS object

After having opened the /pps/services/launcher/control object for publishing, call write() to modify the object's attributes. Use the appropriate message format with the valid stop command.

#define CMD_START        "stop"
int msgsize;
char msgbuf[4096];
int ret = 0;
char *id = strdup("101");
char *data = strdup("HelloWebWorks.testDev_lloWebWorks1fa80f60");
msgsize = snprintf(msgbuf,
                   "msg::%s\ndat::%s\nid::%s", CMD_STOP, data, id);
ret = write(pps_fd, msgbuf, (unsigned)msgsize);