Skip to content
Advertisement

Tag: system-calls

How can I make Linux system calls from a C/C++ application, without using assembly, and in a cpu-independent manner? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 4 years ago. Improve this question I am looking to write a program that will need to

Why gdb backtrace syscall address is different from syscall table address

I’m really confusing with syscall address. 1 now I hook a syscall(fake_sendto) replace real syscall(sct[__NR_sendto]), and it workes normally. now I dmesg to show logs: ok, I think the truely sys_sento address is above 0xffffffff8156b2c0 but when I write a test program, gdb print sendto function address is 0x7ffff7b11400 ! see below gdb debug info: why does gdb show different

dup2 paramater order confusion

I have written this simple program: What i want is, redirect the output of ls – l to a file called “theFile.txt”. The code works as i expect. What confuses me here is the order of dup2 parameters. I believe that correct order should be dup2(1, fd) – considering fd as the newFD and 1 as the oldFD. But the

Intermittent segmentation faults in main after fork

I’m taking a class on how to learn programming multi process programs on linux on university. I’m still very green and trying my best to learn, so any thing you might see that is wrong would be welcome. I have a problem that asks me to iterate an array, one half on main process, the other half on the child

Advertisement