]> andersk Git - moira.git/blobdiff - gdb/gdb_fserv.c
Suppress warning about ownership changes - administrators have been warned.
[moira.git] / gdb / gdb_fserv.c
index 4000b35e1f06249ce8cb312d99b6d4237527817e..c1089c024e057e8e25b48c9e2d171193293c1ce0 100644 (file)
@@ -96,7 +96,7 @@ int (*validate)();
        g_do_signals();                         /* set up signal handling */
 
        incoming = create_listening_connection(service);
-       if (incoming == NULL)
+       if (incoming == NULL || connection_status(incoming) != CON_UP)
                GDB_GIVEUP("create_forking_server: can't create listening connection")
 
        /*----------------------------------------------------------*/
@@ -113,8 +113,12 @@ int (*validate)();
                                       gdb_sockaddr_of_client, &gdb_socklen,
                                       &gdb_client_tuple);
                if(complete_operation(listenop) != OP_COMPLETE ||
-                  client == NULL) 
-                       GDB_GIVEUP("create_forking_server: failed to accept client")
+                  client == NULL) {
+                   gdb_perror("GDB create_forking_server: failed to accept client");
+                   reset_operation(listenop);
+                   (void) sever_connection(client);
+                   continue;
+                 }
                
 
                 /*
@@ -161,7 +165,11 @@ int (*validate)();
 /*     Called on SIGCHILD to reap all dead children.
 /*     
 /************************************************************************/
+#ifndef sun
 int
+#else
+void
+#endif
 gdb_reaper()
 {
        union wait status;
@@ -194,5 +202,14 @@ gdb_reaper()
 int
 g_do_signals()
 {
-       (void) signal(SIGCHLD, gdb_reaper);
+#ifdef sun
+    struct sigvec act;
+
+    act.sv_handler = gdb_reaper;
+    act.sv_mask = 0;
+    act.sv_flags = 0;
+    (void) sigvec(SIGCHLD, &act, NULL);
+#else /* sun */
+    (void) signal(SIGCHLD, gdb_reaper);
+#endif 
 }
This page took 0.034117 seconds and 4 git commands to generate.