author | dwmw2 <dwmw2> | 2002-09-20 12:59:59 (UTC) |
---|---|---|
committer | dwmw2 <dwmw2> | 2002-09-20 12:59:59 (UTC) |
commit | 6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc (patch) (unidiff) | |
tree | c135d91fbd04c19936a71010505777ef7b86ad96 /noncore/settings/sshkeys/main.cpp | |
parent | a05c10c9744020be31c3038b2de3401b5cc673fb (diff) | |
download | opie-6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc.zip opie-6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc.tar.gz opie-6cbf7b19d7bb3fcd2471dbaa531a7b2ae05f0fcc.tar.bz2 |
Works now
Diffstat (limited to 'noncore/settings/sshkeys/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sshkeys/main.cpp | 24 |
1 files changed, 20 insertions, 4 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,14 +1,30 @@ | |||
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 | ||
12 | return a.exec(); | 28 | return a.exec(); |
13 | } | 29 | } |
14 | 30 | ||