aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-terminal
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2016-12-22 07:58:02 -0500
committerKen Moore <ken@ixsystems.com>2016-12-22 07:58:02 -0500
commit54c5a04b55d1ebd96376e7cf3c6cce7d4b9317ba (patch)
tree9a6197333a21371bff9122921c6559d338783188 /src-qt5/desktop-utils/lumina-terminal
parentMake sure the clock plugin for the panel adjusts to account for 1 or 2 lines ... (diff)
parentMove the terminal over to the standardized "forkpty()" function for doing the... (diff)
downloadlumina-54c5a04b55d1ebd96376e7cf3c6cce7d4b9317ba.tar.gz
lumina-54c5a04b55d1ebd96376e7cf3c6cce7d4b9317ba.tar.bz2
lumina-54c5a04b55d1ebd96376e7cf3c6cce7d4b9317ba.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-terminal')
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp16
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/TtyProcess.h2
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro2
3 files changed, 15 insertions, 5 deletions
diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp
index a4550fe3..b6ef8f6d 100644
--- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp
+++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.cpp
@@ -291,8 +291,18 @@ QByteArray TTYProcess::CleanANSI(QByteArray raw, bool &incomplete){
pid_t TTYProcess::LaunchProcess(int& fd, char *prog, char **child_args){
//Returns: -1 for errors, positive value (file descriptor) for the master side of the TTY to watch
//First open/setup a new pseudo-terminal file/device on the system (master side)
- fd = posix_openpt(O_RDWR | O_NOCTTY); //open read/write
- if(fd<0){ return -1; } //could not create pseudo-terminal
+ //fd = posix_openpt(O_RDWR | O_NOCTTY); //open read/write
+ pid_t PID = forkpty( &fd, 0, 0, 0);
+ if(PID==0){
+ //Child process
+ int rc = execvp(prog, child_args);
+ //::close(fds); //no need to keep original file descriptor open any more
+ exit(rc);
+ }else{
+ //Master process
+ return PID;
+ }
+ /*if(fd<0){ return -1; } //could not create pseudo-terminal
int rc = grantpt(fd); //set permissions
if(rc!=0){ return -1; }
rc = unlockpt(fd); //unlock file (ready for use)
@@ -325,7 +335,7 @@ pid_t TTYProcess::LaunchProcess(int& fd, char *prog, char **child_args){
rc = execvp(prog, child_args);
::close(fds); //no need to keep original file descriptor open any more
exit(rc);
- }
+ }*/
//MASTER thread (or error)
return PID;
}
diff --git a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h
index f8d709a8..42684112 100644
--- a/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h
+++ b/src-qt5/desktop-utils/lumina-terminal/TtyProcess.h
@@ -32,7 +32,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
-//#include <libutil.h>
+#include <libutil.h>
class TTYProcess : public QObject{
Q_OBJECT
diff --git a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro
index 4c623087..5216372c 100644
--- a/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro
+++ b/src-qt5/desktop-utils/lumina-terminal/lumina-terminal.pro
@@ -23,7 +23,7 @@ SOURCES += main.cpp \
TtyProcess.cpp
-LIBS += -lncurses
+LIBS += -lutil
TRANSLATIONS = i18n/l-terminal_af.ts \
bgstack15