diff options
author | Kris Moore <kris@pcbsd.org> | 2016-03-09 20:22:13 -0500 |
---|---|---|
committer | Kris Moore <kris@pcbsd.org> | 2016-03-09 20:22:13 -0500 |
commit | f3ffd87d80c752cf685cd8f5100a0c15612baf39 (patch) | |
tree | 47fe2a673fe1000356190cd000462eec8ba11695 | |
parent | Fix setting up the execvp args, the [0] needs to be the actual program, (diff) | |
download | lumina-f3ffd87d80c752cf685cd8f5100a0c15612baf39.tar.gz lumina-f3ffd87d80c752cf685cd8f5100a0c15612baf39.tar.bz2 lumina-f3ffd87d80c752cf685cd8f5100a0c15612baf39.zip |
Fix a freeze when starting the pty process, can't ReadAll() if nothing
exists
-rw-r--r-- | desktop-utilities/lumina-terminal/TerminalWidget.cpp | 16 | ||||
-rw-r--r-- | desktop-utilities/lumina-terminal/TtyProcess.cpp | 5 |
2 files changed, 4 insertions, 17 deletions
diff --git a/desktop-utilities/lumina-terminal/TerminalWidget.cpp b/desktop-utilities/lumina-terminal/TerminalWidget.cpp index d733b7d3..3ab850bb 100644 --- a/desktop-utilities/lumina-terminal/TerminalWidget.cpp +++ b/desktop-utilities/lumina-terminal/TerminalWidget.cpp @@ -29,20 +29,8 @@ TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent) upTimer = new QTimer(this); upTimer->setInterval(1000); - connect(upTimer, SIGNAL(timeout()), this, SLOT(UpdateText()) ); - - //Create/launch the QProcess - /*PROC = new QProcess(this); - PROC->setProcessChannelMode(QProcess::MergedChannels); - PROC->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); - PROC->setProgram( PROC->processEnvironment().value("SHELL","/bin/sh") ); - PROC->setWorkingDirectory(dir); - //Connect the signals/slots - connect(PROC, SIGNAL(readyReadStandardOutput()), this, SLOT(UpdateText()) ); - connect(PROC, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(ShellClosed()) ); - //Now start the shell - PROC->start(QIODevice::ReadWrite);*/ - + // connect(upTimer, SIGNAL(timeout()), this, SLOT(UpdateText()) ); + upTimer->start(); } diff --git a/desktop-utilities/lumina-terminal/TtyProcess.cpp b/desktop-utilities/lumina-terminal/TtyProcess.cpp index 050d1338..366a157b 100644 --- a/desktop-utilities/lumina-terminal/TtyProcess.cpp +++ b/desktop-utilities/lumina-terminal/TtyProcess.cpp @@ -86,11 +86,10 @@ pid_t TTYProcess::LaunchProcess(int& fd, char *prog, char **child_args){ setsid(); //Make current process new session leader (so we can set controlling terminal) ioctl(0,TIOCSCTTY, 1); //Set the controlling terminal to the slave PTY - // Example my_args which works - // char *my_args[] = { "/bin/csh", NULL }; - + qDebug() << "Starting execvp"; //Execute the designated program rc = execvp(prog, child_args); + qDebug() << "Stopping execvp"; ::close(fds); //no need to keep original file descriptor open any more exit(rc); } |