* [Cluster-devel] cluster/gnbd/server gnbd_serv.c gserv.c gserv.h
@ 2006-09-21 19:03 bmarzins
0 siblings, 0 replies; 3+ messages in thread
From: bmarzins @ 2006-09-21 19:03 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: bmarzins at sourceware.org 2006-09-21 19:03:52
Modified files:
gnbd/server : gnbd_serv.c gserv.c gserv.h
Log message:
Fix for bugzilla #207351. The individual gserv processes inherit the atexit
callbacks from the main gnbd_serv process. One of those kills all the gserv
processes. Now they don't do that.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gnbd_serv.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.1&r2=1.3.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gserv.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4&r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gserv.h.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3&r2=1.3.2.1
--- cluster/gnbd/server/gnbd_serv.c 2005/03/16 22:40:39 1.3.2.1
+++ cluster/gnbd/server/gnbd_serv.c 2006/09/21 19:03:52 1.3.2.2
@@ -337,7 +337,9 @@
void exit_main(void)
{
- kill_all_gserv();
+ if (!is_gserv) /* don't do this is you are a gserv process. Only
+ the main process should kill the gservs */
+ kill_all_gserv();
}
int main(int argc, char **argv)
--- cluster/gnbd/server/gserv.c 2004/08/14 01:33:21 1.4
+++ cluster/gnbd/server/gserv.c 2006/09/21 19:03:52 1.4.2.1
@@ -34,6 +34,10 @@
#include <sys/socket.h>
+int is_gserv = 0; /* This gets set when child is forked. It is needed so that
+ the gserv processes don't execute the atexit commands
+ set up for the main program */
+
list_decl(waiter_list);
list_decl(gserv_list);
off_t file_offset = (off_t)-1;
@@ -402,6 +406,7 @@
unblock_sigchld();
return;
}
+ is_gserv = 1;
unblock_sigchld();
memset(&act,0,sizeof(act));
--- cluster/gnbd/server/gserv.h 2004/07/09 18:56:21 1.3
+++ cluster/gnbd/server/gserv.h 2006/09/21 19:03:52 1.3.2.1
@@ -49,6 +49,8 @@
(x)->sectors = cpu_to_be64((x)->sectors);\
(x)->version = cpu_to_be16((x)->version);
+extern int is_gserv;
+
void gserv(int sock, char *node, uint64_t sectors, unsigned int flags,
char *name, int devfd);
int add_gserv_info(int sock, char *node, dev_info_t *dev, pid_t pid);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] cluster/gnbd/server gnbd_serv.c gserv.c gserv.h
@ 2006-09-21 19:34 bmarzins
0 siblings, 0 replies; 3+ messages in thread
From: bmarzins @ 2006-09-21 19:34 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4U4
Changes by: bmarzins at sourceware.org 2006-09-21 19:34:34
Modified files:
gnbd/server : gnbd_serv.c gserv.c gserv.h
Log message:
Fix for bz #207351. The individual gserv processes inherit the atexit
callbacks from the main gnbd_serv process. One of those kills all the gserv
processes. Now they don't do that.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gnbd_serv.c.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.3.2.1&r2=1.3.2.1.12.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gserv.c.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.4&r2=1.4.14.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gserv.h.diff?cvsroot=cluster&only_with_tag=RHEL4U4&r1=1.3&r2=1.3.14.1
--- cluster/gnbd/server/gnbd_serv.c 2005/03/16 22:40:39 1.3.2.1
+++ cluster/gnbd/server/gnbd_serv.c 2006/09/21 19:34:34 1.3.2.1.12.1
@@ -337,7 +337,9 @@
void exit_main(void)
{
- kill_all_gserv();
+ if (!is_gserv) /* don't do this is you are a gserv process. Only
+ the main process should kill the gservs */
+ kill_all_gserv();
}
int main(int argc, char **argv)
--- cluster/gnbd/server/gserv.c 2004/08/14 01:33:21 1.4
+++ cluster/gnbd/server/gserv.c 2006/09/21 19:34:34 1.4.14.1
@@ -34,6 +34,10 @@
#include <sys/socket.h>
+int is_gserv = 0; /* This gets set when child is forked. It is needed so that
+ the gserv processes don't execute the atexit commands
+ set up for the main program */
+
list_decl(waiter_list);
list_decl(gserv_list);
off_t file_offset = (off_t)-1;
@@ -402,6 +406,7 @@
unblock_sigchld();
return;
}
+ is_gserv = 1;
unblock_sigchld();
memset(&act,0,sizeof(act));
--- cluster/gnbd/server/gserv.h 2004/07/09 18:56:21 1.3
+++ cluster/gnbd/server/gserv.h 2006/09/21 19:34:34 1.3.14.1
@@ -49,6 +49,8 @@
(x)->sectors = cpu_to_be64((x)->sectors);\
(x)->version = cpu_to_be16((x)->version);
+extern int is_gserv;
+
void gserv(int sock, char *node, uint64_t sectors, unsigned int flags,
char *name, int devfd);
int add_gserv_info(int sock, char *node, dev_info_t *dev, pid_t pid);
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Cluster-devel] cluster/gnbd/server gnbd_serv.c gserv.c gserv.h
@ 2006-09-21 20:00 bmarzins
0 siblings, 0 replies; 3+ messages in thread
From: bmarzins @ 2006-09-21 20:00 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: bmarzins at sourceware.org 2006-09-21 20:00:01
Modified files:
gnbd/server : gnbd_serv.c gserv.c gserv.h
Log message:
Fix for bugzilla #207599. The individual gserv processes inherit the atexit
callbacks from the main gnbd_serv process. One of those kills all the gserv
processes. Now they don't do that.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gnbd_serv.c.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gserv.c.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gnbd/server/gserv.h.diff?cvsroot=cluster&r1=1.3&r2=1.4
--- cluster/gnbd/server/gnbd_serv.c 2005/03/18 19:39:39 1.4
+++ cluster/gnbd/server/gnbd_serv.c 2006/09/21 20:00:01 1.5
@@ -337,7 +337,9 @@
void exit_main(void)
{
- kill_all_gserv();
+ if (!is_gserv) /* don't do this is you are a gserv process. Only
+ the main process should kill the gservs */
+ kill_all_gserv();
}
int main(int argc, char **argv)
--- cluster/gnbd/server/gserv.c 2006/08/11 15:18:14 1.5
+++ cluster/gnbd/server/gserv.c 2006/09/21 20:00:01 1.6
@@ -34,6 +34,10 @@
#include <sys/socket.h>
+int is_gserv = 0; /* This gets set when child is forked. It is needed so that
+ the gserv processes don't execute the atexit commands
+ set up for the main program */
+
list_decl(waiter_list);
list_decl(gserv_list);
off_t file_offset = (off_t)-1;
@@ -402,6 +406,7 @@
unblock_sigchld();
return;
}
+ is_gserv = 1;
unblock_sigchld();
memset(&act,0,sizeof(act));
--- cluster/gnbd/server/gserv.h 2004/07/09 18:56:21 1.3
+++ cluster/gnbd/server/gserv.h 2006/09/21 20:00:01 1.4
@@ -49,6 +49,8 @@
(x)->sectors = cpu_to_be64((x)->sectors);\
(x)->version = cpu_to_be16((x)->version);
+extern int is_gserv;
+
void gserv(int sock, char *node, uint64_t sectors, unsigned int flags,
char *name, int devfd);
int add_gserv_info(int sock, char *node, dev_info_t *dev, pid_t pid);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-21 20:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21 20:00 [Cluster-devel] cluster/gnbd/server gnbd_serv.c gserv.c gserv.h bmarzins
-- strict thread matches above, loose matches on Subject: below --
2006-09-21 19:34 bmarzins
2006-09-21 19:03 bmarzins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).