- if (!setjmp(myctx)) {
- SIGNAL(SIGALRM, alrmser);
- bytes = fstat(fd, &st) != -1 ?
- (int) st.st_size : 100;
-
- /*
- ** amount of time to wait depends on
- ** message size
- */
- if (bytes <= 100) {
- /* give at least 5 minutes */
- seconds = 300;
- } else if (bytes >= 90000) {
- /* a half hour is long enough */
- seconds = 1800;
- } else {
- seconds = (bytes / 60) + 300;
- }
- alarm((unsigned int) seconds);
- status = pidwait(child_id, 0);
- alarm(0);
-
- if (verbose) {
- if (status == 0)
- verbose_printf(", success.\n");
- else
- if ((status & 0xff00) == 0xff00)
- verbose_printf(", system error\n");
- else
- pidstatus(status, stdout, ", failed");
- }
- return (status == 0 ? 0 : -1);
- } else {