summaryrefslogtreecommitdiff
path: root/noncore/settings/sshkeys/main.cpp
Unidiff
Diffstat (limited to 'noncore/settings/sshkeys/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sshkeys/main.cpp24
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
5int main(int argc, char *argv[]) 12int 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