Print With Delay 0.5 (process independency)

/* Jeffrin Jose Licensed GPL v3 Copyright August 2010 GPL –> http://www.gnu.org/copyleft/gpl.html */ #include #include #include int main() { int seconds; int i=0,getptr; pid_t pid; char array[20]=”Happy Friendship Day”; /* printf(“n Happy Friendship Day n”); */ pid=fork(); if (pid == 0) { setsid(); setenv(“PS1″,”$”,1); /* getptr=getenv(“PS1”); printf(“%s”,getptr); */ printf(“\n”); for(i=0;i<20;i++) { printf("%c",array[i]); /* for(seconds=0;seconds<100000000;seconds++);*/ /* …

pop an address from the stack..

GDB shows retq instruction (gdb) disassemble Dump of assembler code for function __read_nocancel: 0x00007fbd743e0e89 : mov $0x0,%eax 0x00007fbd743e0e8e : syscall => 0x00007fbd743e0e90 : cmp $0xfffffffffffff001,%rax 0x00007fbd743e0e96 : jae 0x7fbd743e0ec9 0x00007fbd743e0e98 : retq End of assembler dump. (gdb) Process Involved GPL Ghostscript 8.71. PostScript and PDF language interpreter and previewer. A Screen Shot GPL Ghostscript 8.71 …

Print With Delay 0.4 (fork step 1)

/* Jeffrin Jose Licensed GPL v3 Copyright August 2010 GPL –> http://www.gnu.org/copyleft/gpl.html */ #include #include #include int main() { int seconds; int i=0,getptr; pid_t pid; char array[20]=”Happy Friendship Day”; /* printf(“n Happy Friendship Day n”); */ pid=fork(); if (pid == 0) { setenv(“PS1″,”$”,1); /* getptr=getenv(“PS1”); printf(“%s”,getptr); */ printf(“\n”); for(i=0;i<20;i++) { printf("%c",array[i]); /* for(seconds=0;seconds<100000000;seconds++);*/ /* system("sleep …