Results 1 to 2 of 2
I've had this problem and so has my friend today.
We have a program where we fork() another process and inside of that, we reassign a string that was created ...
- 10-21-2008 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 1
g++ strings c_str() function and fork()
I've had this problem and so has my friend today.
We have a program where we fork() another process and inside of that, we reassign a string that was created outside of the fork(). Inside of the fork, in the child process, a new string should in an essence be created for use. When the value of the string is evaluated, it's correct. However, when we run the c_str() function on it, it acts as if we haven't changed it (maybe it's referring back to the value in the other process). Is this a bug or is this bad usage on our part?
Thanks.
David
- 10-21-2008 #2
Could we see your code...Thanks
and welcome to the Linux Forums


Reply With Quote