#include <stdio.h> main() { int fd1,fd2; char c; fd1=creat("/tmp/tfil1",0770); write(fd1,"alma",4); close(fd1); fd1=open("/tmp/tfil1",0); fd2=dup(fd1); read(fd1,&c,1); printf("%c",c); read(fd2,&c,1); printf("%c",c); close(fd2); close(fd1); }
#include <signal.h> int i; elj1() { i=23; } main() { printf("START!\n"); signal(SIGINT,elj1); i=0; while (i==0) { kill(getpid(),SIGINT); } printf("STOP!\n"); }
>>
, &
, <
, stb...)