Changeset 6611 for pymolproxy/branches/1.0/pymolproxy.c
- Timestamp:
- Nov 11, 2016, 2:18:27 AM (8 years ago)
- Location:
- pymolproxy/branches/1.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pymolproxy/branches/1.0
- Property svn:mergeinfo changed
/pymolproxy/trunk merged: 6610
- Property svn:mergeinfo changed
-
pymolproxy/branches/1.0/pymolproxy.c
r6606 r6611 2103 2103 struct timeval end; 2104 2104 2105 #if DEBUG2106 2105 DEBUG("Entering InitProxy"); 2107 #endif 2106 2108 2107 /* Create two pipes for communication with the external application. One 2109 2108 * each for the applications's: stdin and stdout. */ … … 2165 2164 stats.pid = child; 2166 2165 2167 #if DEBUG2168 2166 DEBUG("Started %s DISPLAY=%s", argv[0], getenv("DISPLAY")); 2169 #endif 2167 2170 2168 /* close opposite end of pipe, these now belong to the child process */ 2171 2169 close(sin[0]); … … 2192 2190 2193 2191 for (cp = cmdProcs; cp->name != NULL; cp++) { 2194 #if DEBUG2195 2192 DEBUG("Adding command %s", cp->name); 2196 #endif2197 2193 Tcl_CreateCommand(interp, cp->name, cp->proc, p, NULL); 2198 2194 } … … 2209 2205 int result, status; 2210 2206 2211 #if DEBUG2212 2207 DEBUG("Enter FreeProxy"); 2213 #endif 2208 2214 2209 close(p->cout); 2215 2210 close(p->sout); … … 2220 2215 ServerStats(0); 2221 2216 2222 #if DEBUG2223 2217 DEBUG("Waiting for pymol server to exit"); 2224 #endif2225 2218 alarm(5); 2226 2219 if (waitpid(p->pid, &result, 0) < 0) { 2227 2220 ERROR("error waiting on pymol server to exit: %s", strerror(errno)); 2228 2221 } 2229 #if DEBUG 2222 2230 2223 DEBUG("attempting to signal (SIGTERM) pymol server."); 2231 #endif2232 2224 kill(-p->pid, SIGTERM); /* Kill process group */ 2233 2225 alarm(5); 2234 2226 2235 #if DEBUG2236 2227 DEBUG("Waiting for pymol server to exit after SIGTERM"); 2237 #endif2238 2228 if (waitpid(p->pid, &result, 0) < 0) { 2239 2229 if (errno != ECHILD) { … … 2244 2234 status = -1; 2245 2235 while ((status == -1) && (errno == EINTR)) { 2246 #if DEBUG2247 2236 DEBUG("Attempting to signal (SIGKILL) pymol server."); 2248 #endif2249 2237 kill(-p->pid, SIGKILL); /* Kill process group */ 2250 2238 alarm(10); 2251 #if DEBUG 2239 2252 2240 DEBUG("Waiting for pymol server to exit after SIGKILL"); 2253 #endif2254 2241 status = waitpid(p->pid, &result, 0); 2255 2242 alarm(0);
Note: See TracChangeset
for help on using the changeset viewer.