summaryrefslogtreecommitdiff
path: root/www-misc
authorMichael Krelin <hacker@klever.net>2007-07-25 22:07:11 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-25 22:07:11 (UTC)
commit0b9d15b8dcc3383a60c35245911d7153b9bfd7b7 (patch) (unidiff)
tree5778b470309ce29e8d1f68463082a9c2ca0e6ff2 /www-misc
parent88f05c619e0e57f335725fc28f61556da231535b (diff)
downloadasylum-0b9d15b8dcc3383a60c35245911d7153b9bfd7b7.zip
asylum-0b9d15b8dcc3383a60c35245911d7153b9bfd7b7.tar.gz
asylum-0b9d15b8dcc3383a60c35245911d7153b9bfd7b7.tar.bz2
added missing files for previous commit
Diffstat (limited to 'www-misc') (more/less context) (ignore whitespace changes)
-rw-r--r--www-misc/pglogd/files/digest-pglogd-2.3-r13
-rw-r--r--www-misc/pglogd/files/pglogd-2.3-foreground.patch82
2 files changed, 85 insertions, 0 deletions
diff --git a/www-misc/pglogd/files/digest-pglogd-2.3-r1 b/www-misc/pglogd/files/digest-pglogd-2.3-r1
new file mode 100644
index 0000000..1d5af03
--- a/dev/null
+++ b/www-misc/pglogd/files/digest-pglogd-2.3-r1
@@ -0,0 +1,3 @@
1MD5 49e494598d1502cf2a20356146fab654 pglogd-2.3.tar.gz 22796
2RMD160 7e9264af8130b3fb5bd3dc89718fb4dfa28e1ec6 pglogd-2.3.tar.gz 22796
3SHA256 2a0e81cc0e0ab3132a48f11834908fdc6b8e4d70c0e6c12dff8815bc93582e78 pglogd-2.3.tar.gz 22796
diff --git a/www-misc/pglogd/files/pglogd-2.3-foreground.patch b/www-misc/pglogd/files/pglogd-2.3-foreground.patch
new file mode 100644
index 0000000..9ccf1e4
--- a/dev/null
+++ b/www-misc/pglogd/files/pglogd-2.3-foreground.patch
@@ -0,0 +1,82 @@
1diff --git a/pglogd.c b/pglogd.c
2index 4635a4c..c13f1c2 100644
3--- a/pglogd.c
4+++ b/pglogd.c
5@@ -210,6 +210,7 @@ main(int argc, char **argv)
6 */
7 char *cpConfigFile; /* The user supplied configuration file. */
8 int iSkipDatabase; /* Whether or not to skip the database connection at start-up. */
9 + int iDaemonize; /* Whether to become a daemon */
10
11
12 /*
13@@ -266,13 +267,15 @@ main(int argc, char **argv)
14
15 cpConfigFile = NULL;
16 iSkipDatabase = FALSE;
17 +iDaemonize = TRUE;
18
19
20 /*
21 - * Check for our two options:
22 + * Check for our three options:
23 *
24 * 1. Skip connecting to the database at statup.
25 * 2. Read from a specified config file.
26 + * 3. Run in foreground.
27 */
28 for ( i = 1 ; i < argc ; i++ )
29 {
30@@ -284,6 +287,8 @@ main(int argc, char **argv)
31
32 else if ( strncmp(&(*argv[i]), "-s", 2) == 0 )
33 iSkipDatabase = TRUE;
34 + else if ( strncmp(&(*argv[i]), "-f", 2) == 0 )
35 + iDaemonize = FALSE;
36 }
37
38
39@@ -352,26 +357,28 @@ main(int argc, char **argv)
40 }
41
42
43 -/*
44 - * Become a deamon, muhaaaa
45 - */
46 -if ( (pPid = fork()) < 0 )
47 -{
48 - fprintf(stderr, "%s: Fatal error, could not fork() [%d]\n", cpAppName, errno);
49 - exit(ERR_FORK);
50 -}
51 +if(iDaemonize) {
52 + /*
53 + * Become a deamon, muhaaaa
54 + */
55 + if ( (pPid = fork()) < 0 )
56 + {
57 + fprintf(stderr, "%s: Fatal error, could not fork() [%d]\n", cpAppName, errno);
58 + exit(ERR_FORK);
59 + }
60
61 -else if ( pPid != 0 )
62 - exit(ERR_NORMAL);
63 + else if ( pPid != 0 )
64 + exit(ERR_NORMAL);
65
66
67 -/*
68 - * Parent is gone, the child becomes the session leader.
69 - */
70 -setsid();
71 + /*
72 + * Parent is gone, the child becomes the session leader.
73 + */
74 + setsid();
75 + iDaemon = 1;
76 +}
77 chdir("/");
78 umask(S_IWGRP|S_IWOTH);
79 -iDaemon = 1;
80
81 logentry("Resuming normal operation.", 0);
82