Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: lib by andrew from
([email protected])
2. Linux-HA CVS: include by andrew from
([email protected])
3. Linux-HA CVS: lib by andrew from
([email protected])
4. Linux-HA CVS: include by andrew from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 8 Mar 2006 15:22:02 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/clplumbing
Modified Files:
GSource.c
Log Message:
Add a callback that is fired when the child process completes its work
Allows the parent to know if the child succeeded or not
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/GSource.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- GSource.c 10 Feb 2006 17:19:49 -0000 1.78
+++ GSource.c 8 Mar 2006 22:22:01 -0000 1.79
@@ -1,4 +1,4 @@
-/* $Id: GSource.c,v 1.78 2006/02/10 17:19:49 alan Exp $ */
+/* $Id: GSource.c,v 1.79 2006/03/08 22:22:01 andrew Exp $ */
/*
* Copyright (c) 2002 Alan Robertson <[EMAIL PROTECTED]>
*
@@ -1674,6 +1674,7 @@
* in child process */
void (*prefork)(gpointer userdata);/* Call before fork */
void (*postfork)(gpointer userdata);/* Call after fork */
+ void (*complete)(gpointer userdata, int status, int signo,
int exitcode);/* Call after complete */
gpointer userdata; /* Info to pass 'fun' */
gboolean isrunning; /* TRUE if child is running */
gboolean runagain; /* TRUE if we need to run
@@ -1693,6 +1694,10 @@
{
struct tempproc_track * pt = p->privatedata;
+ if (pt->complete) {
+ pt->complete(pt->userdata, status, signo, exitcode);
+ }
+
pt->isrunning=FALSE;
if (pt->runagain) {
pt->runagain=FALSE;
@@ -1784,7 +1789,8 @@
, const char * procname
, gpointer userdata
, void (*prefork)(gpointer p)
-, void (*postfork)(gpointer p))
+, void (*postfork)(gpointer p)
+, void (*complete)(gpointer userdata, int status, int signo,
int exitcode))
{
struct tempproc_track* p;
@@ -1801,6 +1807,7 @@
p->userdata = userdata;
p->prefork = prefork;
p->postfork = postfork;
+ p->complete = complete;
ret = G_main_add_TriggerHandler(priority
, TempProcessTrigger, p, tempproc_destroy_notify);
------------------------------
Message: 2
Date: Wed, 8 Mar 2006 15:22:02 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include/clplumbing
Modified Files:
GSource.h
Log Message:
Add a callback that is fired when the child process completes its work
Allows the parent to know if the child succeeded or not
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/clplumbing/GSource.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- GSource.h 8 Feb 2006 05:25:15 -0000 1.17
+++ GSource.h 8 Mar 2006 22:22:01 -0000 1.18
@@ -1,4 +1,4 @@
-/* $Id: GSource.h,v 1.17 2006/02/08 05:25:15 alan Exp $ */
+/* $Id: GSource.h,v 1.18 2006/03/08 22:22:01 andrew Exp $ */
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -200,11 +200,13 @@
, const char * procname /* What do we call this process? */
, gpointer userdata /* Passed to 'triggerfun' */
, void (*prefork)(gpointer p) /* Called before fork */
-, void (*postfork)(gpointer p)); /* Called by parent process
+, void (*postfork)(gpointer p) /* Called by parent process
* after fork(2) call.
* Each has 'userdata'
* passed to it.
*/
+, void (*complete)(gpointer p, int status, int signo, int
exitcode)); /* called after the child process completes */
+
/*
* Special notes:
* - No more than one child process will be active at a time per trigger
------------------------------
Message: 3
Date: Wed, 8 Mar 2006 15:22:51 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : lib
Dir : linux-ha/lib/clplumbing
Modified Files:
cl_log.c
Log Message:
Avoid using nasty timeouts to be sure that all logging has been sent to ha_logd
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/cl_log.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -3 -r1.70 -r1.71
--- cl_log.c 26 Jan 2006 22:35:59 -0000 1.70
+++ cl_log.c 8 Mar 2006 22:22:51 -0000 1.71
@@ -1,4 +1,4 @@
-/* $Id: cl_log.c,v 1.70 2006/01/26 22:35:59 alan Exp $ */
+/* $Id: cl_log.c,v 1.71 2006/03/08 22:22:51 andrew Exp $ */
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -723,6 +723,16 @@
static int drop_msg_num = 0;
+void
+cl_flush_logs(void)
+{
+ if(logging_daemon_chan == NULL) {
+ return;
+ }
+ logging_daemon_chan->ops->waitout(logging_daemon_chan);
+ sleep(2);
+}
+
int
LogToLoggingDaemon(int priority, const char * buf,
int bufstrlen, gboolean use_pri_str)
------------------------------
Message: 4
Date: Wed, 8 Mar 2006 15:22:51 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: include by andrew from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : andrew
Host :
Project : linux-ha
Module : include
Dir : linux-ha/include/clplumbing
Modified Files:
cl_log.h
Log Message:
Avoid using nasty timeouts to be sure that all logging has been sent to ha_logd
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/include/clplumbing/cl_log.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- cl_log.h 18 Dec 2005 22:02:39 -0000 1.26
+++ cl_log.h 8 Mar 2006 22:22:51 -0000 1.27
@@ -1,4 +1,4 @@
-/* $Id: cl_log.h,v 1.26 2005/12/18 22:02:39 alan Exp $ */
+/* $Id: cl_log.h,v 1.27 2006/03/08 22:22:51 andrew Exp $ */
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -60,6 +60,8 @@
, GLogLevelFlags log_level, const gchar *message
, gpointer user_data);
+void cl_flush_logs(void);
+
typedef struct CircularBuffer_s
{
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 28, Issue 8
*******************************************