[Qt-interest] Is there anyways to check if a Process is Alive ?

Arnold Krille arnold at arnoldarts.de
Fri Mar 26 20:38:00 CET 2010


On Friday 26 March 2010 11:20:56 Sean Harmer wrote:
> On Friday 26 March 2010 09:02:18 Aaron Lewis wrote:
> > More Specific for my problem:
> >
> >     I want to search for Process by name on UNIX , kind like a daemon
> > process (e.g sendmail)
> 
> The quick and easy solution is to use QProcess to call a system tool such
>  as ps and parse the output yourself to extract the information that you
>  need.

Run "pidof <daemon>" in your process and check the return-value and the 
output. If there is output, its the pid of the (running) process.

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100326/fa14859c/attachment.bin 


More information about the Qt-interest-old mailing list