Changeset 6612 for pymolproxy/trunk
- Timestamp:
- Nov 11, 2016, 2:31:50 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pymolproxy/trunk/pymolproxy.c
r6610 r6612 109 109 #define WRITE_DEBUG 0 110 110 #define EXEC_DEBUG 0 111 #define LOG_PYMOL_STDERR 0 111 112 112 113 #define FORCE_UPDATE (1<<0) … … 2126 2127 if (child == 0) { /* Child process */ 2127 2128 int f; 2128 char tmpname[ 200];2129 char tmpname[BUFSIZ]; 2129 2130 2130 2131 /* … … 2140 2141 dup2(sout[1], 1); /* Server standard output */ 2141 2142 2143 #if LOG_PYMOL_STDERR 2142 2144 /* Redirect child's stderr to a log file. */ 2143 sprintf(tmpname, "%s/PYMOL-%d-stderr.XXXXXX", LOGDIR, getpid()); 2144 f = mkstemp(tmpname); 2145 sprintf(tmpname, "%s/pymol-%d.stderr", LOGDIR, getpid()); 2146 f = open(tmpname, O_WRONLY | O_CREAT | O_TRUNC, 0600); 2147 #else 2148 sprintf(tmpname, "/dev/null"); 2149 /* Discard stderr */ 2150 f = open(tmpname, O_WRONLY, 0600); 2151 #endif 2145 2152 if (f < 0) { 2146 ERROR("can't open file `%s'to capture pymol stderr: %s", tmpname,2153 ERROR("can't open \"%s\" to capture pymol stderr: %s", tmpname, 2147 2154 strerror(errno)); 2148 2155 exit(1); … … 2273 2280 status = GetLine(&p->client, &numBytes, &line); 2274 2281 if (status != BUFFER_OK) { 2275 ERROR("can't read client stdout (numBytes=%d ): %s", numBytes,2276 strerror(errno));2282 ERROR("can't read client stdout (numBytes=%d, status=$d): %s", 2283 numBytes, status, strerror(errno)); 2277 2284 goto done; 2278 2285 } … … 2375 2382 hdrLength = strlen(header); 2376 2383 #if WRITE_DEBUG 2377 DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d", numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength); 2384 DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d", 2385 numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength); 2378 2386 #endif 2379 2387 imgPtr = NewImage(&list, numBytes + hdrLength); … … 2420 2428 frecord = NULL; 2421 2429 if (recording) { 2422 char fileName[ 200];2430 char fileName[BUFSIZ]; 2423 2431 2424 2432 sprintf(fileName, "/tmp/pymolproxy%d.py", getpid());
Note: See TracChangeset
for help on using the changeset viewer.