Title: Checking running Genero-Programs on Client-Side Post by: Stefan S. on November 27, 2014, 01:41:03 pm Hello,
If Programs running in container Mode I can check if there are running childs of the container before stopping the Parent-Program (IF ui.Interface.getChildCount()>0 THEN …) That’s OK and works fine. Is the a way to check the same, without running the Program in Container-Mode ? In our case the user has first to Close all Programs before closing our Menu-Program. (We don’t want to check running processes on the Server-Side or set those Information in a database table) Thanks in Advance. Kind regards Stefan Serwe Title: Re: Checking running Genero-Programs on Client-Side Post by: Anderson P. on December 04, 2014, 12:46:14 pm Interesting question... I have two similar cases, in one of them i need to check if the program is already running, because users must only run one instance of the program. In the other case, i run multiple instances of a program for performance propose (each instance connect to one of multiple servers to run some querys) and i need to control the amount of instances to avoid a overload.
In both cases i check the processes on the server side using the "ps -ef" Linux command, but will be better to have a built-in command to check this. Title: Re: Checking running Genero-Programs on Client-Side Post by: Lionel F. on December 10, 2014, 02:43:44 pm Hi Stefan, Hi Anderson,
Since each process is independent, there is no easy solution and there is no existing frontcall achieving this on the client side. The only suggestion I have is to add a popup menu when closing your menu application for asking user to check that other programs are correctly closed and that he really wants to quit. Best regards, Lionel Title: Re: Checking running Genero-Programs on Client-Side Post by: Anderson P. on December 10, 2014, 04:13:32 pm Well, in that case i will leave my contribution with the function we use here to count running instances of a given program, using a Linux command...
You basically do a ps -ef and grep the program name, read the response and discard lines with the program name that don't actually indicate that the program is running. Replace <program name> with the name of the program you want to count. Code
|