Explorar o código

Merge branch 'maint'

* maint:
  Remove test thread code
  Remove defunct tcl/pthread lines
Bryan Drewery %!s(int64=11) %!d(string=hai) anos
pai
achega
d28d690c82
Modificáronse 6 ficheiros con 0 adicións e 121 borrados
  1. 0 14
      build/autotools/includes/acinclude.m4
  2. 0 14
      configure
  3. 0 1
      src/bg.cc
  4. 0 1
      src/main.cc
  5. 0 85
      src/thread.cc
  6. 0 6
      src/thread.h

+ 0 - 14
build/autotools/includes/acinclude.m4

@@ -490,20 +490,6 @@ AC_DEFUN([EGG_CHECK_LIBS],
   AC_CHECK_LIB(dl, dlopen)
 
 #  AC_CHECK_LIB(z, gzopen, ZLIB="-lz")
-  # This is needed for Tcl libraries compiled with thread support
-#  AC_CHECK_LIB(pthread, pthread_mutex_init, [dnl
-#  ac_cv_lib_pthread_pthread_mutex_init=yes
-#  ac_cv_lib_pthread="-lpthread"], [dnl
-#    AC_CHECK_LIB(pthread, __pthread_mutex_init, [dnl
-#    ac_cv_lib_pthread_pthread_mutex_init=yes
-#    ac_cv_lib_pthread="-lpthread"], [dnl
-#      AC_CHECK_LIB(pthreads, pthread_mutex_init, [dnl
-#      ac_cv_lib_pthread_pthread_mutex_init=yes
-#      ac_cv_lib_pthread="-lpthreads"], [dnl
-#        AC_CHECK_FUNC(pthread_mutex_init, [dnl
-#        ac_cv_lib_pthread_pthread_mutex_init=yes
-#        ac_cv_lib_pthread=""],
-#        ac_cv_lib_pthread_pthread_mutex_init=no)])])])
   if test "$SUNOS" = "yes"; then
     # For suns without yp
     AC_CHECK_LIB(dl, main)

+ 0 - 14
configure

@@ -4907,20 +4907,6 @@ fi
 
 
 #  AC_CHECK_LIB(z, gzopen, ZLIB="-lz")
-  # This is needed for Tcl libraries compiled with thread support
-#  AC_CHECK_LIB(pthread, pthread_mutex_init, [dnl
-#  ac_cv_lib_pthread_pthread_mutex_init=yes
-#  ac_cv_lib_pthread="-lpthread"], [dnl
-#    AC_CHECK_LIB(pthread, __pthread_mutex_init, [dnl
-#    ac_cv_lib_pthread_pthread_mutex_init=yes
-#    ac_cv_lib_pthread="-lpthread"], [dnl
-#      AC_CHECK_LIB(pthreads, pthread_mutex_init, [dnl
-#      ac_cv_lib_pthread_pthread_mutex_init=yes
-#      ac_cv_lib_pthread="-lpthreads"], [dnl
-#        AC_CHECK_FUNC(pthread_mutex_init, [dnl
-#        ac_cv_lib_pthread_pthread_mutex_init=yes
-#        ac_cv_lib_pthread=""],
-#        ac_cv_lib_pthread_pthread_mutex_init=no)])])])
   if test "$SUNOS" = "yes"; then
     # For suns without yp
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5

+ 0 - 1
src/bg.cc

@@ -28,7 +28,6 @@
 
 #include "common.h"
 #include "bg.h"
-#include "thread.h"
 #include "main.h"
 #include <signal.h>
 #ifdef HAVE_SYS_PTRACE_H

+ 0 - 1
src/main.cc

@@ -37,7 +37,6 @@
 #include "misc.h"
 #include "binary.h"
 #include "response.h"
-#include "thread.h"
 #include "settings.h"
 #include "misc_file.h"
 #include "net.h"

+ 0 - 85
src/thread.cc

@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 1997 Robey Pointer
- * Copyright (C) 1999 - 2002 Eggheads Development Team
- * Copyright (C) 2002 - 2014 Bryan Drewery
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-/*
- * thread.c -- handles:
- *
- * threads
- */
-
-
-#include "common.h"
-#include <pthread.h>
-#include <stdio.h>
-#ifdef HAVE_SYS_PTRACE_H
-# include <sys/ptrace.h>
-#endif /* HAVE_SYS_PTRACE_H */
-#include <sys/wait.h>
-#include <sys/types.h>
-#include <errno.h>
-
-static pthread_mutex_t my_lock = PTHREAD_MUTEX_INITIALIZER;
-
-void *
-thread_main(void *arg)
-{
-  pid_t pid = (pid_t) arg;
-
-  printf("THREADED! MY PARENT: %d\n", pid);
-
-printf("my pid: %d\n", getpid());
-ptrace(PTRACE_ATTACH, pid, 0, 0);
-
-while (1) {
-  int i = 0;
-
-  waitpid(pid, &i, 0);
-  if (WSTOPSIG(i)) {
-   ptrace(PTRACE_CONT, pid, (char *) 1, WSTOPSIG(i));
-   printf("pid was signaled! %d\n", WSTOPSIG(i));
-//   kill(pid, WSTOPSIG(i));
-  } else
-    ptrace(PTRACE_CONT, pid, (char *) 1, 0);
-}
-
-//kill(pid, SIGCHLD);
-//kill(pid, SIGCONT);
-
-while (1)
-sleep(1);
-//  pthread_mutex_unlock(&my_lock);
-//  pthread_mutex_destroy(&my_lock);
-  pthread_exit(0);
-printf("WTF\n");
-}
-
-void init_thread(int pid) {
-printf("init_thread called from %d\n", pid);
-//  pthread_mutex_lock(&my_lock);        /* to allow only one ftp thread at a time */
-  pthread_t thread;
-  pthread_attr_t thread_attr;
-
-  pthread_attr_init(&thread_attr);
-  pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
-  pthread_attr_setstacksize(&thread_attr, 65536);
-
-  pthread_create(&thread, &thread_attr, &thread_main, (void *) pid);
-}
-/* vim: set sts=2 sw=2 ts=8 et: */

+ 0 - 6
src/thread.h

@@ -1,6 +0,0 @@
-#ifndef _THREAD_H
-#define _THREAD_H
-
-void init_thread(int);
-
-#endif /* !_THREAD_H */