From d9dfccf0ac3f8ef31f947eb22944976cd1cb52e3 Mon Sep 17 00:00:00 2001 From: gstreamer Date: Sun, 2 May 2010 16:29:04 +0200 Subject: [PATCH] http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2010x04x28x054348 from 3.2 branch --- CHANGELOG | 3 +++ CREDITS | 4 ++++ configure | 18 +++++++++--------- motion.c | 10 ++++++++++ video_freebsd.h | 2 ++ 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b855e9a..0288685 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -63,6 +63,9 @@ Bugfixes http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2010x04x13x032553 * Fix conv_uyvyto420p segfault ( William M Brack ) * Enhancing the palette selection ( William M Brack ) + * Fix zombies on OpenBSD. (Mark Feenstra) + http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2010x04x28x054348 + 3.2.11.1 Sumary of Changes diff --git a/CREDITS b/CREDITS index 6e06a05..6e2382c 100644 --- a/CREDITS +++ b/CREDITS @@ -463,6 +463,10 @@ Michael Finsterbusch to the "Live Stream Server". http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionStreamAuthPatch +Mark Feenstra + * Fix zombies on OpenBSD. + http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2010x04x28x054348 + Miguel Freitas * Came up with the round robing idea. diff --git a/configure b/configure index bf2e67a..9991244 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for motion trunkREV511. +# Generated by GNU Autoconf 2.65 for motion trunkREV513. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -549,8 +549,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='motion' PACKAGE_TARNAME='motion' -PACKAGE_VERSION='trunkREV511' -PACKAGE_STRING='motion trunkREV511' +PACKAGE_VERSION='trunkREV513' +PACKAGE_STRING='motion trunkREV513' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1213,7 +1213,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures motion trunkREV511 to adapt to many kinds of systems. +\`configure' configures motion trunkREV513 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1274,7 +1274,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of motion trunkREV511:";; + short | recursive ) echo "Configuration of motion trunkREV513:";; esac cat <<\_ACEOF @@ -1415,7 +1415,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -motion configure trunkREV511 +motion configure trunkREV513 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2012,7 +2012,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by motion $as_me trunkREV511, which was +It was created by motion $as_me trunkREV513, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -5817,7 +5817,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by motion $as_me trunkREV511, which was +This file was extended by motion $as_me trunkREV513, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5879,7 +5879,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -motion config.status trunkREV511 +motion config.status trunkREV513 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" diff --git a/motion.c b/motion.c index 348ede0..55f5be3 100644 --- a/motion.c +++ b/motion.c @@ -1146,6 +1146,16 @@ static void *motion_loop(void *arg) if (cnt->track.type) cnt->moved = track_center(cnt, cnt->video_dev, 0, 0, 0); +#ifdef __OpenBSD__ + /* + * FIXMARK + * Fixes zombie issue on OpenBSD 4.6 + */ + struct sigaction sig_handler_action; + struct sigaction sigchild_action; + setup_signals(&sig_handler_action, &sigchild_action); +#endif + /* * MAIN MOTION LOOP BEGINS HERE * Should go on forever... unless you bought vaporware :) diff --git a/video_freebsd.h b/video_freebsd.h index ff2814d..7da9acb 100644 --- a/video_freebsd.h +++ b/video_freebsd.h @@ -15,6 +15,8 @@ #ifdef __NetBSD__ #include +#elif __OpenBSD__ +#include #elif defined(OLD_BKTR) #include #include