Diffstat (limited to 'noncore/settings/sshkeys/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/sshkeys/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/settings/sshkeys/main.cpp b/noncore/settings/sshkeys/main.cpp index 37be8bf..a7b1d56 100644 --- a/noncore/settings/sshkeys/main.cpp +++ b/noncore/settings/sshkeys/main.cpp | |||
@@ -1,11 +1,27 @@ | |||
1 | 1 | ||
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include "sshkeys.h" | 3 | #include "sshkeys.h" |
4 | #include <stdio.h> | ||
5 | #include <sys/types.h> | ||
6 | #include <sys/stat.h> | ||
7 | #include <fcntl.h> | ||
8 | #include <sys/ioctl.h> | ||
9 | #include <unistd.h> | ||
10 | |||
4 | 11 | ||
5 | int main(int argc, char *argv[]) | 12 | int main(int argc, char *argv[]) |
6 | { | 13 | { |
7 | QPEApplication a(argc, argv); | 14 | QPEApplication a(argc, argv); |
8 | SSHKeysApp app; | 15 | SSHKeysApp app; |
16 | int fd; | ||
17 | |||
18 | /* If we had a controlling TTY, detach from it. | ||
19 | This is to ensure the SSH uses ssh-askpass */ | ||
20 | fd = open("/dev/tty", O_RDONLY); | ||
21 | if (fd != -1) { | ||
22 | ioctl(fd, TIOCNOTTY, NULL); | ||
23 | close(fd); | ||
24 | } | ||
9 | 25 | ||
10 | a.showMainWidget(&app); | 26 | a.showMainWidget(&app); |
11 | 27 | ||