Stopping an application

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

Publish stop command to the PPS object

After opening the /pps/services/launcher/control object for publishing, call write() to modify the object's attributes. Use the appropriate message format with the 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);

For information about Application Launcher and the PPS control object it uses, see launcher in the System Services Reference and /pps/services/launcher/control in the PPS Objects Reference.