Skip to content
Discussion options

You must be logged in to vote

now i start my code from file1 and i write my logs of file1 in to fileA and internally in file1 i call a functoin that is in file2 now when it goes to file2 i want to write the logs of file2 to fileB and after the execution of file2 completes it returns back to file1 now again i want the logs to be written to fileA is this possible ?

Is what's referred to as a "file" here actually a process?
If so, it's not possible.
This is because accessing another process's memory is unsafe.
If Process A writes to Process B's memory while Process B is accessing the same memory, the data will be corrupted.

Consider exchanging log data between processes so that each process can access log files using i…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@tt4g
Comment options

@Kubendranath
Comment options

@tt4g
Comment options

Answer selected by Kubendranath
@Kubendranath
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants