Add config.h.in to gitignore. Kill helper_thread.

master
Payden Sutherland 12 years ago
parent 06ac80bd3b
commit 5564a6e1f2

2
.gitignore vendored

@ -1,5 +1,5 @@
# http://www.gnu.org/software/automake
config.h.in
Makefile.in
Makefile
# http://www.gnu.org/software/autoconf

@ -1,100 +0,0 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `pthread' library (-lpthread). */
#undef HAVE_LIBPTHREAD
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#undef HAVE_REALLOC
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strstr' function. */
#undef HAVE_STRSTR
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
/* Define to rpl_realloc if the replacement function should be used. */
#undef realloc
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t

@ -9,6 +9,9 @@
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/un.h>
#include <signal.h>
#include <pthread.h>
@ -65,9 +68,14 @@ void *libwsclient_run_thread(void *ptr) {
}
void libwsclient_finish(wsclient *client) {
//TODO: handle UNIX socket helper thread shutdown better than killing it... :P
if(client->helper_thread) {
pthread_kill(client->helper_thread, SIGINT);
}
if(client->run_thread) {
pthread_join(client->run_thread, NULL);
}
}
void libwsclient_onclose(wsclient *client, int (*cb)(wsclient *c)) {
@ -378,6 +386,7 @@ int libwsclient_helper_socket(wsclient *c, const char *path) {
return WS_HELPER_CREATE_SOCK_ERR;
}
if(bind(sockfd, (struct sockaddr *)&c->helper_sa, len) == -1) {
fprintf(stderr, "Error binding UNIX socket.\n");
perror("bind");
@ -409,6 +418,7 @@ void *libwsclient_helper_socket_thread(void *ptr) {
for(;;) { //TODO: some way to cleanly break this loop
len = sizeof(remote);
if((remote_sock = accept(c->helper_sock, (struct sockaddr *)&remote, &len)) == -1) {
continue;
}

Loading…
Cancel
Save