X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libustcomm%2Fustcomm.c;h=e8199b3aaf5c6b70eadb2bd2fb01083684ae9c36;hb=772030fed323e388da467735cf4b5e8781acb710;hp=0a5ab6aaaf1110d8e66a44b123f81f4d9829c878;hpb=69ba01560f9193dbf4ad2fc8361efb725704807c;p=ust.git diff --git a/libustcomm/ustcomm.c b/libustcomm/ustcomm.c index 0a5ab6a..e8199b3 100644 --- a/libustcomm/ustcomm.c +++ b/libustcomm/ustcomm.c @@ -33,8 +33,6 @@ #include "localerr.h" #define UNIX_PATH_MAX 108 -#define SOCK_DIR "/tmp/socks" -#define UST_SIGNAL SIGIO #define MSG_MAX 1000 @@ -82,6 +80,10 @@ static int signal_process(pid_t pid) return 0; } +int pid_is_online(pid_t pid) { + return kill(pid, UST_SIGNAL) != -1; +} + static int send_message_fd(int fd, const char *msg) { int result; @@ -415,7 +417,7 @@ static int init_named_socket(char *name, char **path_out) return -1; } -int ustcomm_send_request(struct ustcomm_connection *conn, char *req, char **reply) +int ustcomm_send_request(struct ustcomm_connection *conn, const char *req, char **reply) { int result;