1316 |
|
getview(0, vs) != NULL) { |
1317 |
|
if (!strcmp(c_rpict, DEF_RPICT_PATH) && |
1318 |
|
getview(1, NULL) == NULL) { |
1319 |
< |
sprintf(sfile, "rpiece_%s.txt", vs); |
1319 |
> |
sprintf(sfile, "rpsync_%s.txt", vs); |
1320 |
|
strcpy(rppopt, "-PP pfXXXXXX"); |
1321 |
|
} else { |
1322 |
|
strcpy(rppopt, "-S 1 -PP pfXXXXXX"); |
1323 |
|
} |
1324 |
|
pfile = rppopt + strlen(rppopt) - 8; |
1325 |
< |
if (mktemp(pfile) == NULL) |
1325 |
> |
if (mktemp(pfile) == NULL) { |
1326 |
|
if (do_rpiece) { |
1327 |
|
fprintf(stderr, "%s: cannot create\n", pfile); |
1328 |
|
quit(1); |
1329 |
< |
} else |
1330 |
< |
pfile = NULL; |
1329 |
> |
} |
1330 |
> |
pfile = NULL; |
1331 |
> |
} |
1332 |
|
} |
1333 |
|
vn = 0; /* do each view */ |
1334 |
|
while ((vw = getview(vn++, vs)) != NULL) { |
1357 |
|
} |
1358 |
|
/* parallel running? */ |
1359 |
|
if (do_rpiece) { |
1360 |
< |
if (rfdt < oct1date || fdate(sfile) < oct1date) { |
1360 |
> |
if (rfdt < oct1date || !fdate(sfile)) { |
1361 |
|
rfdt = 0; /* start fresh */ |
1362 |
|
if ((fp = fopen(sfile, "w")) == NULL) { |
1363 |
|
fprintf(stderr, "%s: cannot create\n", |
1468 |
|
finish_process(); /* exit if child */ |
1469 |
|
} |
1470 |
|
wait_process(1); /* wait for children to finish */ |
1471 |
< |
if (pfile != NULL) { /* clean up rpict persistent mode */ |
1471 |
> |
if (pfile != NULL) { /* clean up persistent rpict */ |
1472 |
|
RT_PID pid; |
1473 |
|
fp = fopen(pfile, "r"); |
1474 |
|
if (fp != NULL) { |
1495 |
|
printf("\ttouch %s\n", fn); |
1496 |
|
if (!nprocs) |
1497 |
|
return(0); |
1497 |
– |
#ifdef notused |
1498 |
– |
if (access(fn, F_OK) == -1) /* create it */ |
1499 |
– |
if (close(open(fn, O_WRONLY|O_CREAT, 0666)) == -1) |
1500 |
– |
return(-1); |
1501 |
– |
#endif |
1498 |
|
return(setfdate(fn, time((time_t *)NULL))); |
1499 |
|
} |
1500 |
|
|