|
From: | Daniel J Sebald |
Subject: | Re: Qt/gui on MacOSX |
Date: | Tue, 06 Nov 2012 04:34:35 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 11/05/2012 05:55 PM, Michael Goffioul wrote:
If there was a clean way to dissociate from current terminal and re-attach to another PTY without forking, I'd be more than happy to use it, but I haven't find such solution so far. Gnuplot's problem is the opposite: running a GUI in a separate/child thread, while the CLI is running in the main thread. This is not possible under Mac OS X. The only solution is to run the CLI as a separate thread and keeps the GUI in the main thread, which is what we do, but we end up to a another related Mac OS X limitation.
The author of the Qt driver for gnuplot believes that the Qt driver can be done without fork. Unfortunately, no one on gnuplot developer list uses Windows so the concept can't be tested thoroughly unless someone with a Windows machine volunteers to assist a little. A dearth of Windows users in this Octave Maintainers List is also a problem.
So if avoiding the fork could be accomplished and OS X were to use the Qt driver instead of X-windows driver, that might partially simplify things.
In any case, if you come up with some alternative that allows running a only single process on OSX I'd very much like to hear about it. I was never able to find an OSX guru who could produce such a creature.In our case, I think what may work (not tested) is to re-exec octave after the fork with some special argument to avoid re-fork'ing.
Whatever the solution, I think it would be good to start out keeping the three major operating systems in mind (sorry if I overlooked one) even though we don't have any Windows developers. It seems to me the best way to accomplish this in a portable fashion is for Qt to have a feature for executing subprocesses. There is this QProcess:
http://doc.qt.digia.com/qt/qprocess.html that appears to have a lot of member functions.This will require some thought as right now the terminal doesn't seem to work so well inside the GUI, but that might not be the communication's fault. I do know that if STDERR is not redirected to the terminal window, the Octave pager won't work correctly. That may complicate things.
Dan
[Prev in Thread] | Current Thread | [Next in Thread] |