[Pkg-privacy-commits] [onioncat] 153/340: debugging of process fork refined, parent exits with exitcode 0
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository onioncat.
commit 13b81f62b3f36723038d824c949743dde0e4a1a3
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date: Fri Feb 20 22:19:32 2009 +0000
debugging of process fork refined, parent exits with exitcode 0
git-svn-id: http://www.cypherpunk.at/svn/onioncat/trunk@465 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
configure | 22 +++++++++++-----------
src/ocat.c | 11 ++++++++---
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/configure b/configure
index 227646d..6eb9da5 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.61 for onioncat 0.1.10-438M.
+# Generated by GNU Autoconf 2.61 for onioncat 0.1.10-464M.
#
# Report bugs to <rahra at cypherpunk.at>.
#
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='onioncat'
PACKAGE_TARNAME='onioncat'
-PACKAGE_VERSION='0.1.10-438M'
-PACKAGE_STRING='onioncat 0.1.10-438M'
+PACKAGE_VERSION='0.1.10-464M'
+PACKAGE_STRING='onioncat 0.1.10-464M'
PACKAGE_BUGREPORT='rahra at cypherpunk.at'
# Factoring default headers for most tests.
@@ -1206,7 +1206,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 onioncat 0.1.10-438M to adapt to many kinds of systems.
+\`configure' configures onioncat 0.1.10-464M to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1272,7 +1272,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of onioncat 0.1.10-438M:";;
+ short | recursive ) echo "Configuration of onioncat 0.1.10-464M:";;
esac
cat <<\_ACEOF
@@ -1362,7 +1362,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-onioncat configure 0.1.10-438M
+onioncat configure 0.1.10-464M
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1376,7 +1376,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 onioncat $as_me 0.1.10-438M, which was
+It was created by onioncat $as_me 0.1.10-464M, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2066,7 +2066,7 @@ fi
# Define the identity of the package.
PACKAGE='onioncat'
- VERSION='0.1.10-438M'
+ VERSION='0.1.10-464M'
cat >>confdefs.h <<_ACEOF
@@ -2217,7 +2217,7 @@ ac_config_headers="$ac_config_headers config.h"
cat >>confdefs.h <<\_ACEOF
-#define SVN_REVISION "438M"
+#define SVN_REVISION "464M"
_ACEOF
@@ -5300,7 +5300,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by onioncat $as_me 0.1.10-438M, which was
+This file was extended by onioncat $as_me 0.1.10-464M, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5353,7 +5353,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-onioncat config.status 0.1.10-438M
+onioncat config.status 0.1.10-464M
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/src/ocat.c b/src/ocat.c
index 70944e7..af7fdc8 100644
--- a/src/ocat.c
+++ b/src/ocat.c
@@ -105,19 +105,24 @@ int mk_pid_file(void)
void background(void)
{
- log_msg(LOG_INFO, "backgrounding");
+ pid_t pid;
+ log_debug("backgrounding");
- switch(fork())
+ pid = fork();
+ switch(pid)
{
case -1:
log_msg(LOG_ERR, "fork failed: %s. Staying in foreground", strerror(errno));
return;
case 0:
- log_debug("child successfully forked");
+ log_msg(LOG_INFO, "process backgrounded, pid = %d", getpid());
return;
default:
+ log_debug("parent [%d] exits, background pid = %d", getpid(), pid);
+ if (CNF(logf))
+ fclose(CNF(logf));
exit(0);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git
More information about the Pkg-privacy-commits
mailing list