#include <ust/ustconsumer.h>
#include "lowlevel.h"
-#include "usterr.h"
+#include "usterr_signal_safe.h"
#include "ustcomm.h"
#define GET_SUBBUF_OK 1
{
int result;
+ result = close(buf->pipe_fd);
+ if(result == -1) {
+ WARN("problem closing the pipe fd");
+ }
+
result = close(buf->app_sock);
if(result == -1) {
WARN("problem calling ustcomm_close_app");
int result;
/* Only check if socket dir exists if we are using the default directory */
- result = ensure_dir_exists(SOCK_DIR);
+ result = ensure_dir_exists(SOCK_DIR, S_IRWXU | S_IRWXG | S_IRWXO);
if (result == -1) {
ERR("Unable to create socket directory %s", SOCK_DIR);
return -1;