kprocess, kpty & kdesu
hausmann at kde.org
Wed May 2 22:47:08 BST 2007
On Wednesday 02 May 2007 23:07:18 Oswald Buddenhagen wrote:
> > The notion of a Uniux process in our desktop environment seems to
> > disappear to me in favor of DBus/DCOP services for example.
> oh, yeah, right. /QProcess/d
Think about it from the application perspective. I believe most developers
nowadays want to open documents (KRun, invokeMailer/Browser) or talk to a
service using DBus/DCOP directly (KDBusServiceStarter) instead of launching
processes directly. The fact that this functionality is implemented using
KProcess is pretty transparent to application developers. KUniqueApplication
is another example of hiding the notion of the underlying application process
on the callee side.
> > When are we going to be able to talk to kdm or gdm using the system
> > bus? :)
> i've been thinking about that since before n7y. like about many other
> Really Cool Things (TM). :)
> > > - an equivalent of this class is needed for adding ptys to kprocess
> > > in a qprocess-like way.
> > Again, who uses this? Searching for "KPty" on lxr.kde.org doesn't seem
> > to bring up a whole lot of use-cases that ask for a generic
> > KSequentialDevice :)
> hmm? this doesn't make any sense. look for setUsePty and then think
> about how using bare kpty (that is, even less than old kprocess offers)
> with qprocess would look like.
Ok, I agree that even those few applications that need ptys should be able to
use a simple API. How about KTerminalProcess then? Or KUnixProcess? Just a
slightly different name to stress that the fact this is not mean for
applications portable to Windows.
> > > it is pretty much conceivable that other sequential devices want to
> > > be wrapped, too. [...} the same function in kdm that uses the pty
> > > uses a char device as an alternative. q.e.d. :=)
> > Your one kdm example doesn't convince me at least for a generic
> > solution
> do you want more quality or more quantity? more quality is impossible,
> as this is the perfect example. more quantity will come all by itself
> once the class is there - this is really basic functionality, and that
> happens to be used a lot - be it with or without nice qt abstractions
> (remember our discussion about qprocess redirections?).
I agree about quality since your code obviously works. But for a prominent
name I think quantity is just pretty important, too (in the sense of solving
a real problem for more than three unix specific applications).
Anyway, I think I've said all I can and we risk running in circles. It was an
interesting thread for sure and this is my last mail to it :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kde-core-devel