Professional Documents
Culture Documents
#include<stdio.h>
#include<pthread.h>
#include<stdlib.h>
system("firefox”)
pthread_exit(0);
system("mousepad”);
pthread_exit(0);
void main()
pthread_ t1,t2;
pthread_join(t1, NULL);
pthread_join(t2, NULL);
#include <stdio.h>
#include <sys/shm.h>
#include <sys/ipc.h>
void main()
int shmid;
if (shmid > 0)
$ nano shmwrite.c
$ nano shmread.c
$ ./shmread
#include <sys/shm.h>
#include <sys/ipc.h>
#include <string.h>
Void main()
int shmid;
void * mem;
shmid = shmget(MY_SHM_ID,0,0);
shmdt(mem;)
#include <stdio.h>
#tinclude <sys/shm.h>
#include <sys/ipc.h>
#include <string.h>
void main()
int shmid;
void * mem;
shmid = shmget(MY_SHM_ID,0,0);
printf("%s",(char *)mem);
shmdt(mem);