- Timestamp:
- May 3, 2010, 8:45:22 AM (16 years ago)
- Location:
- branches/simmosaic_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simmosaic_branches
- Property svn:mergeinfo changed
-
branches/simmosaic_branches/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/simmosaic_branches/Ohana/src/opihi/pcontrol/StopHosts.c
r18098 r27839 69 69 } 70 70 71 int StopHost (Host *host ) {71 int StopHost (Host *host, int mode) { 72 72 73 73 int status; 74 74 75 status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_STOP_HOST); 75 switch (mode) { 76 case PCONTROL_HOST_DOWN: 77 status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_DOWN_HOST); 78 break; 79 case PCONTROL_HOST_OFF: 80 status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_STOP_HOST); 81 break; 82 default: 83 ABORT ("programming error: invalid StopHost mode"); 84 } 76 85 77 86 /* check on success of pclient command */ 78 87 switch (status) { 79 88 case PCLIENT_DOWN: 80 // XXX this is the desired result in any case, so ignore it81 break;89 PutHost (host, PCONTROL_HOST_RESP, STACK_BOTTOM); 90 return (TRUE); 82 91 83 92 case PCLIENT_GOOD: … … 100 109 } 101 110 111 int DownHostResponse (Host *host) { 112 113 DownHost (host); 114 HarvestHost (host[0].pid); 115 return (TRUE); 116 } 117 102 118 /* the host is thought to be down; check for child exit status */ 103 119 int HarvestHost (int pid) { … … 105 121 int i, result, waitstatus; 106 122 107 if (VerboseMode()) gprint (GP_ERR, "harvesting within thread %p\n", pthread_self()); 123 #ifndef __APPLE__ 124 if (VerboseMode()) gprint (GP_ERR, "harvesting within thread %lld\n", (long long) pthread_self()); 125 #endif 108 126 if (VerboseMode()) gprint (GP_ERR, "child process %d is down, wait for exit status\n", pid); 109 127 … … 134 152 135 153 case 0: 136 gprint (GP_ERR, "child did not exit??"); 137 abort (); 138 /** put back in IDLE state? **/ 154 gprint (GP_ERR, "HarvestHost: child with connection to remote host failed to exit: may be hung"); 139 155 break; 140 156
Note:
See TracChangeset
for help on using the changeset viewer.
