Re: Re: Re: how to control a process programmatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2019/11/05 03:17 AM, deloptes wrote:
> Dr. Nikolaus Klepp wrote:
> 
>> What about using "pidof" inside a popen() call? If returns number -> program lives, if not, it's not running.
>> 
> 
> Yes it is also an idea - I was wondering if there is some TQt way.
> 
> I also noticed that if I start the program with --no-fork - I can start as many instances as I want. If I do not
> use --no-fork it reports that it is already running (so it behaves as expected). This is from the program itself.
> 
> The other program that is supposed to start the program in question will need perhaps the pidof or similar to check
> if the program is running.
> 
> I'll look forward thanks
> 
Hi Emanoil,
if you are looking for a general solution (not necessarily TDE or dbus related) you can use either pidof or ps to see
if a specific process is running, as long as you know what you are looking for.

- --no-fork is a parameter that can be passed to TDE application to prevent the program to run using fork, so that you
can run multiple independent instances of such application. Without that, some applications will check if there is
already an existing instance of the same application and switch to it instead of creating a new one.

Cheers
  Michele
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEjhl1z5vbYB3YbFTiKnW3yore1c8FAl3AyRIACgkQKnW3yore
1c9KaQ/8DMnJh4YEztIun6+biaQkYL8UjhCLfFidpsxK6KOi2KbnK+wBY/E9l1OS
d3aHyvsD9QdMvKGBVYxhNEMFCYMvZ5struHpSxts5+0bdesKBxY79UR4JzA4fCwy
l6j9iYj2hvfsV3MJZKp2seDtcLBjO3Kupw2AyVJ3IrFP3Rr0C5Zol3vpNBG3Wrf2
OX6nUHnmydhSMeW/c7ES3CmlQS2v0GKExJPJIxgr1yaGHcgw4qJz2ur3UctY1BIX
0Y3q8KKR9v/DC9ReyfnFVKdQGw7FVkVSR+gHCkmYgL4IrFn29PzQBzJ1PdCE1V2r
cgIPic4ETtlyveFWchgAuQYQB533QRGotjy2I7mNxKBq0yGi6qiDuMGHvlaswHaz
sKRMiZXHKT3ByQBCd0eII1Zgb6Dmi142ckoWwm1SMesiA7B4bF4wFdhld1HhUH1d
CcWNNtJ498fKo0CdtjwNlDNcXV31+6b/OgQ2M0z+C0zJ8eQ0nlwfV9zOQz0KTPs8
YJk+v0oVI0WfKJqb+u+mH+/thXszUX4PHvb0ycB1VY8tuYRwUEZC/HWtAF4eCuW/
fqDq9K1KZW0Aa827njMgdLjI5/5xwASY8y9+uUZcb6q+PRjHt44QYpCsp/cKveyW
ctElu7l6dbZvzMlS956PBKUQ7wFPTG8mYSHA2NeVDuafJemzKzk=
=cjdu
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: trinity-devel-unsubscribe@xxxxxxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: trinity-devel-help@xxxxxxxxxxxxxxxxxxxxxxxxxx
Read list messages on the web archive: http://trinity-devel.pearsoncomputing.net/
Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting




[Index of Archives]     [Trinity Users]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [KDE]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux