These programs are also in your repository, under notes/0125
make syscall
./syscall
strace ./syscall
#include <stdio.h>
int main()
{
puts("Hello, world!\n");
// write(1, "Hello, world!\n", 14);
return 0;
}
#include <stdio.h>
#include <errno.h>
int main()
{
const char* FILENAME = "junk.txt";
int r = unlink(FILENAME);
perror("unlink:");
//printf("result: %d\n", r);
//printf("errno: %d\n", errno);
return 0;
}
comments
powered by Disqus
©2012 Christopher League · some rights reserved · CC by-sa