Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  12 Apr 2021, Isaac Labrie Boulay, Forum, Client gets immediately removed when using a script button. logicCtrl.cppstart_daq.PNG
    Reply  12 Apr 2021, Ben Smith, Forum, Client gets immediately removed when using a script button. 
       Reply  12 Apr 2021, Isaac Labrie Boulay, Forum, Client gets immediately removed when using a script button. debug_logic_controller.txt
          Reply  12 Apr 2021, Ben Smith, Forum, Client gets immediately removed when using a script button. 
             Reply  13 Apr 2021, Isaac Labrie Boulay, Forum, Client gets immediately removed when using a script button. 
                Reply  13 Apr 2021, Stefan Ritt, Forum, Client gets immediately removed when using a script button. 
Message ID: 2145     Entry time: 12 Apr 2021     Reply to this: 2146
Author: Isaac Labrie Boulay 
Topic: Forum 
Subject: Client gets immediately removed when using a script button. 
Hi all,

I'm running into a curious problem when I try to run a program using my custom 
script button. I have been using a script button to start my DAQ, this button 
has always worked. It starts by exporting an absolute path to scripts and then 
runs scripts, my frontend, my analyzer, and mlogger relative to this path.

I recently added a line of code to run a new script "logic_controller". If I run 
the script_daq from my terminal (./start_daq), mhttpd accepts the client and the 
program works as intended. But, if I use the script button, the logic_controller 
program is immediately deleted by MIDAS. It can be seen appearing in the status 
page clients list and then immediately gets deleted. This is a client that runs 
on the local experiment host.

What might be the issue? What is the difference between running the script 
through the terminal as opposed to running it through the mhttpd button?

I have added a picture of my simple script and the logic_controller code.

Any help would be greatly appreciated.

Cheers.

Isaac
Attachment 1: logicCtrl.cpp  3 kB  Uploaded 12 Apr 2021  | Show | Show all
Attachment 2: start_daq.PNG  18 kB  Uploaded 12 Apr 2021  | Show | Show all
ELOG V3.1.4-2e1708b5