User Profile
Collapse
Profile Sidebar
Collapse
what
Last Activity: Jun 27 '12, 11:26 PM
Joined: May 2 '12
Location:
-
I forgot to write that the error line is "*seg_part = 0;" -
I get segmentation fault with "shmat" function
I want to write in a file called "sharedmem" which is in the same directory that the code, but i get segmentation fault. I think I have found the line of the error, but i dont know how to solve it.
This is the code:
Code:#include <stdio.h> #include <stdlib.h> #include <sys/shm.h> #include <errno.h> long int *seg_part; void abandon(char message[]){ perror(message);
No activity results to display
Show More
Leave a comment: