Results 1 to 2 of 2
Hallo together, in advance I apologize for this beginner question : I have a C++ program running (foo.ex) and it will need still some days to finish. Now I want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-16-2012 #1
- Join Date
- Aug 2012
Modify program file while running
in advance I apologize for this beginner question :
I have a C++ program running (foo.ex) and it will need still some days to finish. Now I want to run the same program (foo.ex), but in a modified form, i.e. I want to change some things in the source code and recompile it. My question: is it possible, that the compiling and new execution of the program is doing any 'harm' to my already running process?
For reasons that are too long to explain, it is not possible to copy the program to another filename, I have to use exactly this executable foo.ex.
Thank you for your help!
- 08-17-2012 #2
- Join Date
- Jan 2005
- Saint Paul, MN
Yes, putting a new executable into the same file as a running program is using can cause problems is some cases.
Yes, you can rename the existing executable (see the command "mv") prior to your compiling and linking the new version.