mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
New backend flag for needing a terminal.
This commit is contained in:
parent
e2b0e90c8c
commit
ad6987e1b1
1
putty.h
1
putty.h
@ -482,6 +482,7 @@ enum {
|
||||
/* Backend flags */
|
||||
#define BACKEND_RESIZE_FORBIDDEN 0x01 /* Backend does not allow
|
||||
resizing terminal */
|
||||
#define BACKEND_NEEDS_TERMINAL 0x02 /* Backend must have terminal */
|
||||
|
||||
struct Backend {
|
||||
const BackendVtable *vt;
|
||||
|
@ -820,6 +820,12 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (backvt->flags & BACKEND_NEEDS_TERMINAL) {
|
||||
fprintf(stderr,
|
||||
"Plink must have a terminal to run.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Block SIGPIPE, so that we'll get EPIPE individually on
|
||||
* particular network connections that go wrong.
|
||||
|
@ -393,6 +393,12 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (vt->flags & BACKEND_NEEDS_TERMINAL) {
|
||||
fprintf(stderr,
|
||||
"Plink must have a terminal to run.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
sk_init();
|
||||
if (p_WSAEventSelect == NULL) {
|
||||
fprintf(stderr, "Plink requires WinSock 2\n");
|
||||
|
Loading…
Reference in New Issue
Block a user