sigact.sa_handler = change_status_timer;
sigaction(SIGUSR2, &sigact, NULL);
if (quiet == NO) {
sigact.sa_handler = change_status_timer;
sigaction(SIGUSR2, &sigact, NULL);
if (quiet == NO) {
sigaction(SIGINT, &sigact, NULL);
sigaction(SIGTERM, &sigact, NULL);
sigaction(SIGTSTP, &sigact, NULL);
}
else {
sigaction(SIGINT, &sigact, NULL);
sigaction(SIGTERM, &sigact, NULL);
sigaction(SIGTSTP, &sigact, NULL);
}
else {
sigaction(SIGINT, &sigact, NULL);
sigaction(SIGTERM, &sigact, NULL);
sigact.sa_handler = handle_sigtstp;
sigaction(SIGINT, &sigact, NULL);
sigaction(SIGTERM, &sigact, NULL);
sigact.sa_handler = handle_sigtstp;
- else fd = open(foutname, O_WRONLY | O_CREAT | O_LARGEFILE | write_flags, 0666);
- if (fd == -1) xerror(NO, NO, YES, "%s", foutname);
+ else fd = xopen(foutname, O_WRONLY | O_CREAT | O_LARGEFILE | write_flags);
if (offset) {
if (lseek(fd, offset, SEEK_SET) == -1)
xerror(ignore_seek_errors, NO, NO, "%s: seek failed", foutname);
}
if (offset) {
if (lseek(fd, offset, SEEK_SET) == -1)
xerror(ignore_seek_errors, NO, NO, "%s: seek failed", foutname);
}
if (verbose) tfc_nfsay(stderr, "%s: writing %lld bytes to %s ... ",
tfc_format_pid(progname), nrbytes, foutname);
if (verbose) tfc_nfsay(stderr, "%s: writing %lld bytes to %s ... ",
tfc_format_pid(progname), nrbytes, foutname);
if (error_action == TFC_ERRACT_SYNC) wrpos = tfc_fdgetpos(fd);
_wagain: lio = xwrite(fd, pblk, lrem);
if (error_action == TFC_ERRACT_SYNC) wrpos = tfc_fdgetpos(fd);
_wagain: lio = xwrite(fd, pblk, lrem);