I'm stumped. I have a program that if run from clicking on the icon of the program, crashes, dies, ends, etc., at a certain point. If I run the same program from a terminal, it works perfectly.
The program creates a file (call it filea.sh) with commands, using 'expect' and scp to contact a remote computer and copy one file to a local directory. The created file (filea.sh) is then executed using the 'system(./filea.sh)' function.
If run from the icon, the file gets created, but it looks like it never runs or gets executed. If I run the same program from a terminal, it works perfectly. The file gets created and runs, copying the file from the remote server.
If I run the file that was created by running the program from the icon, filea.sh, in a terminal, it runs perfectly.
I don't believe it's anything to do with 'expect' or 'scp' as I'm using the exact same functions in another part of the program that works if run either way. I also can't believe that it's the code since it works perfectly if run from a terminal.
One more thing to ponder. If I edit the icon and tell it run in a terminal, it works. It only fails at that point when no terminal is involved.
Anyone have ANY ideas before I try to run it through GDB?