Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Events/C/events.c
Normal file
19
Task/Events/C/events.c
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int p[2];
|
||||
pipe(p);
|
||||
if (fork()) {
|
||||
close(p[0]);
|
||||
sleep(1);
|
||||
write(p[1], p, 1);
|
||||
wait(0);
|
||||
} else {
|
||||
close(p[1]);
|
||||
read(p[0], p + 1, 1);
|
||||
puts("received signal from pipe");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue