Check qws server
luca last edited by
My embedded application need to know if there is a running qws server .
My application can be started one or two times at the same time.
The application must be started for the first time with -qws parameter while the second time without -qws:
./app -qws &
(first application started)
(second application started)
I'd like to always start application without -qws, check in the main() if -qws is required and then restart application with right parameter.
int main(int argc, char *argv)
I need qwsRequired() .
Immii last edited by
I dont know of any api which tells you whether qws is running or not, but may be in script you can find with ps and then use that. i know this may not be the answer you wold be looking for but this what comes to my mind
vcsala last edited by
Or you can use some kind of "lock" file mechanism (similar to the daemons running on linux, storing their pid in a file, which can be checked if it does exist or not)