version 1.28, 2009/10/27 23:59:44 |
version 1.29, 2009/12/12 13:38:09 |
|
|
parwrite(FD, buf, size(buf)); |
parwrite(FD, buf, size(buf)); |
quit = 0; |
quit = 0; |
kill(tipout_pid, SIGIOT); |
kill(tipout_pid, SIGIOT); |
read(repdes[0], (char *)&ccc, 1); /* Wait until read process stops */ |
read(tipout_fd, (char *)&ccc, 1); /* Wait until read process stops */ |
|
|
/* |
/* |
* finish command |
* finish command |
|
|
if (boolean(value(VERBOSE))) |
if (boolean(value(VERBOSE))) |
prtime(" lines transferred in ", time(0)-start); |
prtime(" lines transferred in ", time(0)-start); |
tcsetattr(0, TCSAFLUSH, &term); |
tcsetattr(0, TCSAFLUSH, &term); |
write(fildes[1], (char *)&ccc, 1); |
write(tipout_fd, (char *)&ccc, 1); |
signal(SIGINT, f); |
signal(SIGINT, f); |
close(fd); |
close(fd); |
} |
} |
|
|
stop = 0; |
stop = 0; |
f = signal(SIGINT, stopsnd); |
f = signal(SIGINT, stopsnd); |
tcsetattr(0, TCSAFLUSH, &defchars); |
tcsetattr(0, TCSAFLUSH, &defchars); |
read(repdes[0], (char *)&ccc, 1); |
read(tipout_fd, (char *)&ccc, 1); |
if (command != NULL) { |
if (command != NULL) { |
for (pc = command; *pc; pc++) |
for (pc = command; *pc; pc++) |
send(*pc); |
send(*pc); |
|
|
else |
else |
prtime(" lines transferred in ", stop_t-start_t); |
prtime(" lines transferred in ", stop_t-start_t); |
} |
} |
write(fildes[1], (char *)&ccc, 1); |
write(tipout_fd, (char *)&ccc, 1); |
tcsetattr(0, TCSAFLUSH, &term); |
tcsetattr(0, TCSAFLUSH, &term); |
} |
} |
|
|
|
|
signal(SIGINT, SIG_IGN); |
signal(SIGINT, SIG_IGN); |
signal(SIGQUIT, SIG_IGN); |
signal(SIGQUIT, SIG_IGN); |
tcsetattr(0, TCSAFLUSH, &defchars); |
tcsetattr(0, TCSAFLUSH, &defchars); |
read(repdes[0], (char *)&ccc, 1); |
read(tipout_fd, (char *)&ccc, 1); |
/* |
/* |
* Set up file descriptors in the child and |
* Set up file descriptors in the child and |
* let it go... |
* let it go... |
|
|
} |
} |
if (boolean(value(VERBOSE))) |
if (boolean(value(VERBOSE))) |
prtime("away for ", time(0)-start); |
prtime("away for ", time(0)-start); |
write(fildes[1], (char *)&ccc, 1); |
write(tipout_fd, (char *)&ccc, 1); |
tcsetattr(0, TCSAFLUSH, &term); |
tcsetattr(0, TCSAFLUSH, &term); |
signal(SIGINT, SIG_DFL); |
signal(SIGINT, SIG_DFL); |
signal(SIGQUIT, SIG_DFL); |
signal(SIGQUIT, SIG_DFL); |
|
|
signal(SIGINT, SIG_IGN); |
signal(SIGINT, SIG_IGN); |
signal(SIGQUIT, SIG_IGN); |
signal(SIGQUIT, SIG_IGN); |
tcsetattr(0, TCSAFLUSH, &defchars); |
tcsetattr(0, TCSAFLUSH, &defchars); |
read(repdes[0], (char *)&ccc, 1); |
read(tipout_fd, (char *)&ccc, 1); |
/* |
/* |
* Set up file descriptors in the child and |
* Set up file descriptors in the child and |
* let it go... |
* let it go... |
|
|
} |
} |
if (boolean(value(VERBOSE))) |
if (boolean(value(VERBOSE))) |
prtime("away for ", time(0)-start); |
prtime("away for ", time(0)-start); |
write(fildes[1], (char *)&ccc, 1); |
write(tipout_fd, (char *)&ccc, 1); |
tcsetattr(0, TCSAFLUSH, &term); |
tcsetattr(0, TCSAFLUSH, &term); |
signal(SIGINT, SIG_DFL); |
signal(SIGINT, SIG_DFL); |
signal(SIGQUIT, SIG_DFL); |
signal(SIGQUIT, SIG_DFL); |
|
|
*/ |
*/ |
kill(tipout_pid, SIGEMT); |
kill(tipout_pid, SIGEMT); |
if (boolean(value(SCRIPT))) |
if (boolean(value(SCRIPT))) |
write(fildes[1], value(RECORD), size(value(RECORD))); |
write(tipout_fd, value(RECORD), size(value(RECORD))); |
write(fildes[1], "\n", 1); |
write(tipout_fd, "\n", 1); |
/* |
/* |
* wait for TIPOUT to finish |
* wait for TIPOUT to finish |
*/ |
*/ |
read(repdes[0], &c, 1); |
read(tipout_fd, &c, 1); |
if (c == 'n') |
if (c == 'n') |
printf("can't create %s\r\n", value(RECORD)); |
printf("can't create %s\r\n", value(RECORD)); |
} |
} |