- setenv("ACTION", msg->action, 1);
- setenv("DEVPATH", msg->devpath, 1);
+ char action[ACTION_SIZE];
+ char devpath[DEVPATH_SIZE];
+ char seqnum[SEQNUM_SIZE];
+ char *env[] = { action, devpath, seqnum, NULL };
+
+ snprintf(action, ACTION_SIZE-1, "ACTION=%s", msg->action);
+ action[ACTION_SIZE-1] = '\0';
+ snprintf(devpath, DEVPATH_SIZE-1, "DEVPATH=%s", msg->devpath);
+ devpath[DEVPATH_SIZE-1] = '\0';
+ sprintf(seqnum, "SEQNUM=%llu", msg->seqnum);