Diffstat (limited to 'noncore/settings/sshkeys/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sshkeys/main.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/noncore/settings/sshkeys/main.cpp b/noncore/settings/sshkeys/main.cpp index 9f19d0f..d0c0e2b 100644 --- a/noncore/settings/sshkeys/main.cpp +++ b/noncore/settings/sshkeys/main.cpp | |||
@@ -1,2 +1,2 @@ | |||
1 | /* | 1 | /* |
2 | * ssh-agent key manipulation utility | 2 | * ssh-agent key manipulation utility |
@@ -21,29 +21,7 @@ | |||
21 | 21 | ||
22 | #include <qpe/qpeapplication.h> | 22 | #include <opie2/oapplicationfactory.h> |
23 | #include "sshkeys.h" | 23 | #include "sshkeys.h" |
24 | #include <stdio.h> | ||
25 | #include <sys/types.h> | ||
26 | #include <sys/stat.h> | ||
27 | #include <fcntl.h> | ||
28 | #include <sys/ioctl.h> | ||
29 | #include <unistd.h> | ||
30 | 24 | ||
31 | int main(int argc, char *argv[]) | 25 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<SSHKeysApp> ) |
32 | { | ||
33 | QPEApplication a(argc, argv); | ||
34 | SSHKeysApp app; | ||
35 | int fd; | ||
36 | 26 | ||
37 | /* If we had a controlling TTY, detach from it. | ||
38 | This is to ensure that SSH uses ssh-askpass */ | ||
39 | fd = open("/dev/tty", O_RDONLY); | ||
40 | if (fd != -1) { | ||
41 | ioctl(fd, TIOCNOTTY, NULL); | ||
42 | close(fd); | ||
43 | } | ||
44 | |||
45 | a.showMainWidget(&app); | ||
46 | |||
47 | return a.exec(); | ||
48 | } | ||
49 | 27 | ||