RolandHughes
15th June 2015, 05:52
It's late and I could just be thick.
32-bit Ubuntu 12.4.5
latest Qt 5.x
Have a service with a .conf file. It launches a shell script which runs a watchdog program. The watchdog program does many setup verification things then it does a Qt execute() of another shell file. This shell file runs the actual application.
Here is the interesting thing. The shell script makes calls to logger which show it really does inherit the PATH value from the parent process. It doesn't actually use it though.
If I run the program with just programName it dies with an exit code 2, program not found. If I hardcode the full path of /home/userName/bin/programName it dies with an exit code of 134.
I can use a sudo command from my own directory (which, should, in theory, be the same the service conf start on login-session-start) everything works. It is like execute() doesn't pass a complete environment in this instance.
The .conf for the service does chdir to the actual directory for the program.
Anyone else encounter this?
32-bit Ubuntu 12.4.5
latest Qt 5.x
Have a service with a .conf file. It launches a shell script which runs a watchdog program. The watchdog program does many setup verification things then it does a Qt execute() of another shell file. This shell file runs the actual application.
Here is the interesting thing. The shell script makes calls to logger which show it really does inherit the PATH value from the parent process. It doesn't actually use it though.
If I run the program with just programName it dies with an exit code 2, program not found. If I hardcode the full path of /home/userName/bin/programName it dies with an exit code of 134.
I can use a sudo command from my own directory (which, should, in theory, be the same the service conf start on login-session-start) everything works. It is like execute() doesn't pass a complete environment in this instance.
The .conf for the service does chdir to the actual directory for the program.
Anyone else encounter this?