Bug #1237
closedimrest-app is exiting without waiting for any contacts.
100%
Description
Pressing the pair icon in launcher runs imrest-app but that app exits nearly immediately and the launcher icon never changes to enabled.\
$ imrest-app -v5 Verbosity level: 5 main[imrest.c:318] INFO No log file configured. main[imrest.c:328] INFO Running as the app. pairApp[pair-app.c:104] INFO imrest-app is exiting.
Related issues
Updated by Hammel 12 days ago
The imrest-app is just a notifier that tells imrest daemon to enable pair mode.
I need to verify pair.c:pairApp() is called and send the message to the daemon.
I then need to verify imrest is receiving the message in watcher.c:watcherProcessor()
piboxLogger(LOG_INFO, "Toggling pairing state.\n");
It's possible that this block of code needs to be enabled for this to work.
#if 0
/*
* Read message, but ignore it's content (at least for now).
* This is required so select() doesn't think there is more I/O ready.
*/
while ( read(sd, buf, sizeof buf) > 0 )
;
#endif
Updated by Hammel 11 days ago
The problem appears to be that the imrest daemon is run via init as root, but launcher is not root so when it runs imrest-app the latter is run as nobody.
The local socket, /var/run/imrest.sock, used to signal between the app and daemon is root/root 755, which means the user nobody can't write to it.
Appmgr runs imrest-app so it can be privileged via the config. That should fix this problem, I believe.
Updated by Hammel 2 days ago
- Related to Feature #1077: Add pair button to UI added