#include <stdlib.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
int main(int argc,char** argv){
int fd = open("hello.txt",O_RDWR,0);
char * fistChar = (char*)mmap(NULL,1,PROT_WRITE,MAP_SHARED,fd,0);
*fistChar = 'J';
exit(0);
}
hw 9.14
最新推荐文章于 2024-05-01 18:52:32 发布