projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed the backstop termination alarm routing in the C client so that
[spider.git]
/
src
/
client.c
diff --git
a/src/client.c
b/src/client.c
index 69a8aaebd099eb180452eb601098a2d55462645c..7b98f66129bb717914495cdbc7b38305667ae300 100644
(file)
--- a/
src/client.c
+++ b/
src/client.c
@@
-723,13
+723,8
@@
void process_node()
void term_timeout(int i)
{
/* none of this is going to be reused so don't bother cleaning up properly */
void term_timeout(int i)
{
/* none of this is going to be reused so don't bother cleaning up properly */
- if (in && in->t_set)
- tcsetattr(0, TCSANOW, &in->t);
- if (node) {
- shutdown(node->cnum, 3);
- close(node->cnum);
- }
- exit(i);
+ tcflush(0, TCIOFLUSH);
+ kill(getpid(), 9); /* commit suicide */
}
void terminate(int i)
}
void terminate(int i)
@@
-919,8
+914,7
@@
main(int argc, char *argv[])
/* connect up stdin */
in = fcb_new(0, TEXT);
in->sp = sel_open(0, in, "STDIN", fcb_handler, TEXT, SEL_INPUT);
/* connect up stdin */
in = fcb_new(0, TEXT);
in->sp = sel_open(0, in, "STDIN", fcb_handler, TEXT, SEL_INPUT);
- if (tcgetattr(0, &in->t) < 0) {
-/* echo = 0; */
+ if (!isatty(0) || tcgetattr(0, &in->t) < 0) {
in->echo = echo;
in->t_set = 0;
} else {
in->echo = echo;
in->t_set = 0;
} else {