KProcess overhaul
Ralf Habacker
ralf.habacker at freenet.de
Sat Apr 15 21:33:26 BST 2006
Matt Rogers schrieb:
> On Saturday 15 April 2006 12:21, Oswald Buddenhagen wrote:
>
>> On Sat, Apr 15, 2006 at 07:13:45PM +0200, Ralf Habacker wrote:
>>
>>> As far as I understood, are pipes already used on unix to communicate
>>> between parent and child process
>>>
>> yes
>>
>>
>>> for example to detect child process termination,
>>>
>> not really.
>>
You mean closing of the pipe indicate process termination.
>>
>>> to receive stdin and to send stdout/stderr data.
>>>
>> yes. on windows not?
>>
on windows too. I 'm trying to understand the difference to pty. :-)
>>
>>> Is this right ?
>>> "Adding pty support requires to add some hooks (probably by defining
>>> virtual class methods in the QProcess implementation), which could be
>>> used in an inherited class for setup and other required stuff."
>>>
>> roughly. but i don't like the idea at all. if tt implemented a
>> redirection api as powerful as i suggested, no special hooks would be
>> required. unfortunately, they seem reluctant to exposing file
>> descriptors in the api. let's see what they come up with instead.
>>
>
> Aren't file descriptors *nix specific? If they are, that could be why they're
> against it.
>
Windows uses file handles in the basic api. file descriptor are handled
on the runtime library level.
A major difference to unix is that the network api and the file api does
not have the same type of handles. As example you cannot use the same
write() function on c level for sockets and for files. You have to check
by yourself if a handle is a socket or a file handle and then to select
the required function :-(
Ralf
> --
> Matt
>
More information about the kde-core-devel
mailing list