This fixes a bug where the parent's connections remained jammed open.
list_del(&bc->list);
}
+ ustcomm_free_app(&ustcomm_app);
+
buffers_to_export = 0;
have_listener = 0;
init_socket();
return -1;
}
+void ustcomm_free_app(struct ustcomm_app *app)
+{
+ int result;
+ result = close(app->server.listen_fd);
+ if(result == -1) {
+ PERROR("close");
+ return;
+ }
+}
+
/* Used by the daemon to initialize its server so applications
* can connect to it.
*/
extern int ustcomm_init_app(pid_t pid, struct ustcomm_app *handle);
extern void ustcomm_fini_app(struct ustcomm_app *handle);
+extern void ustcomm_free_app(struct ustcomm_app *app);
extern int ustcomm_init_ustd(struct ustcomm_ustd *handle, const char *sock_path);