Compile and Run file_read.c
gcc ./file_read_uv.c -o file_read
file_read
Compile and Run file_read_uv.c
, you have to first install libuv
(use this link)
gcc ./file_read_uv.c -o file_read_uv -luv
file_read_uv
Use strace
, it works only on Linux
# For Debian-based distributions like Ubuntu
sudo apt-get install strace
# For RPM-based distributions like CentOS
sudo yum install strace
Tracing
strace -c ./file_read
strace -c node ./read_file_callback.js