Showing posts with label hackers school. Show all posts
Showing posts with label hackers school. Show all posts

Tuesday, May 31, 2016

Strace experiments on Python

I was watching the video on 'Type  Python ,Press enter. What happens'. I thought of checking whether 'strace' can get the fork() system call that he explained in the video.

Unfortunately I couldn't get ....



But i came to know about the write and read system calls when we type the arithmetic operatons on python ... strace log pasted below. Still I dont know where the calculation is happening.... is there any tool to list which part is calculating it ? where is the fork() ?? brk(0x19ed000) = 0x19ed000 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 write(2, ">>> ", 4) = 4 read(0, "1+2\n", 1024) = 4 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 6), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0206e7b000 write(1, "3\n", 2) = 2 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 write(2, ">>> ", 4) = 4 read(0, "1+4\n", 1024) = 4 write(1, "5\n", 2) = 2 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 write(2, ">>> ", 4) = 4 read(0,

Hackers school

This is something programming students can try to collaborate with self motivated programmers.

https://www.recurse.com/blog/77-hacker-school-is-now-the-recurse-center