--===============1787773038== Content-Type: multipart/signed; boundary="nextPart2255188.roaylf9Qag"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2255188.roaylf9Qag Content-Type: multipart/alternative; boundary="Boundary-00=_gLnjIVCcgZnt2NW" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-00=_gLnjIVCcgZnt2NW Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Monday 28 July 2008, Ramazan Girgin wrote: > Hi all, > I want to open a file and wait it was closed. I found a solution for > this with KRun. I am using KRun::run() method. That method opens file and > gives me started sub process id . With PtyProcess class with checkPid() > method i check if process is still running. > This method is working for text files which opened with krite. But for > open office documents KRun::run() method returns different(wrong) process > id which is not equal started openoffice process id. On my machine it is = 19 > difference between real pid and KRun::run() returns.( like KRun returns > 1900 but real process id is 1919) > How can i know real sub process id ? What's probably happening is that the OpenOffice documents are associated w= ith=20 a wrapper program that gets executed. The wrapper then opens up the right= =20 oowriter or whatever (which now has a different PID) and eventually opens u= p=20 the file. I'm not sure that this is the case here but it's a possibility I think=20 (especially since you mentioned it's always 19 off between the PIDs). As far as figuring out the "real" executable PID, I'm not sure how to do it= in=20 this case. Regards, - Michael Pyne --Boundary-00=_gLnjIVCcgZnt2NW Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit On Monday 28 July 2008, Ramazan Girgin wrote:
> Hi all,
> I want to open a file and wait it was closed. I found a solution for
> this with KRun. I am using KRun::run() method. That method opens file and
> gives me started sub process id . With PtyProcess class with checkPid()
> method i check if process is still running.
> This method is working for text files which opened with krite. But for
> open office documents KRun::run() method returns different(wrong) process
> id which is not equal started openoffice process id. On my machine it is 19
> difference between real pid and KRun::run() returns.( like KRun returns
> 1900 but real process id is 1919)
> How can i know real sub process id ?

What's probably happening is that the OpenOffice documents are associated with a wrapper program that gets executed. The wrapper then opens up the right oowriter or whatever (which now has a different PID) and eventually opens up the file.

I'm not sure that this is the case here but it's a possibility I think (especially since you mentioned it's always 19 off between the PIDs).

As far as figuring out the "real" executable PID, I'm not sure how to do it in this case.

Regards,
- Michael Pyne

--Boundary-00=_gLnjIVCcgZnt2NW-- --nextPart2255188.roaylf9Qag Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkiOcukACgkQqjQYp5Omm0qVOgCgoe1Oq6gIRwUc1jEWlMTf6jW1 uCMAoMaWhrPsAaXDoo9+zFcn7J3B4KzZ =pUbZ -----END PGP SIGNATURE----- --nextPart2255188.roaylf9Qag-- --===============1787773038== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1787773038==--