We have a cRIO connected to hardware over Ethernet, with a driver in the form of a Linux binary. From LabVIEW, we need to launch this driver, and kill it programatically.We can get the application process number using “ps –a | grep [application name]”, and run “kill [process number]”.When doing this with System Exec, it returns an error, saying “\bin\sh:line0:kill:[process number] – Operation Not Permitted”.
The main method LabVIEW has for issuing commands to an operating system is the System Exec VI.Linux decides what permissions commands and processes have based on the permissions of the user who created them. Any commands originating in LabVIEW are associated with the user lvuser.This error occurs when lvuser doesn’t have the permissions required to perform a command. To ensure that LabVIEW does have the necessary permissions, there are two options:
The syntax listed above will work even in circumstance where the default Linux kill command will not, because:
When using this, be careful to make sure the process ID is correct, as accidentally killing the wrong process can have adverse unintended consequences.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.