pid_t or Q_PID?

Thiago Macieira thiago at kde.org
Thu Jun 14 20:12:32 BST 2007


Oswald Buddenhagen wrote:
>On Thu, Jun 14, 2007 at 08:36:40PM +0200, Christian Ehrlicher wrote:
>> Ok, I think we should return at least bool so that the caller can
>> determine if the process was started or not
>
>when you check the logs (and read the code carefully :) you'll notice
>that originally a bool was returned and it was later changed into a pid.
>the immediate users might have vanished again, but i don't think it is a
>very clever idea to remove the functionality.

I think in this case it is.

What do people want to do with a PID?

They can't use kill(2), getsid(2), or waitpid(2)-like functions.

Do they want to know if the process started? That's a bool.

Do they want to have an identifier? That's the KProcess object itself.
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070614/22b654a2/attachment.sig>


More information about the kde-core-devel mailing list