Hi,
I have a few questions about unix tcp/ip programming (C -language).
1) In client/server application I need to implement a dynamically linked list which could be edited through child processes. So if I create this linked list before calling the fork (), the child should be able to write into the linked list elements or add an element to the list. How can this be done because when forking, the child process gets a copy of data and if this child changes that data, the parent process doesn't see it.
2) this problem is similar to the previous: before fork() there is an item_counter which increases every time a child is created. Also every child should be able to increase this item_counter value if necessary. How can the item_counter hold its total value also outside of the child process?
Thanks.
I have a few questions about unix tcp/ip programming (C -language).
1) In client/server application I need to implement a dynamically linked list which could be edited through child processes. So if I create this linked list before calling the fork (), the child should be able to write into the linked list elements or add an element to the list. How can this be done because when forking, the child process gets a copy of data and if this child changes that data, the parent process doesn't see it.
2) this problem is similar to the previous: before fork() there is an item_counter which increases every time a child is created. Also every child should be able to increase this item_counter value if necessary. How can the item_counter hold its total value also outside of the child process?
Thanks.