Results 1 to 2 of 2
I am trying to figure out, how i can find out where system call is made. Ones i figure out where system call is made i want to make sure ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-18-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 2
error checking and system calls
I am trying to figure out, how i can find out where system call is made. Ones i figure out where system call is made i want to make sure error checking is done there. I have 3 c files i am working with and i need figure out where the system call is made. How can i test for error or system call is made?
I have few lines of code below, are these system calls? pipe, dup2?
if (pipefd[0] == PARSE_USEPIPE) {
pipe(pipefd);
setoutpipe = 1;
pid = fork();
if (!pid) { /* child */
if (setoutpipe) {
dup2(pipefd[1], 1); /* connect stdout to pipe if necessary */
}if (!setoutpipe && (pipefd[0] > -1)) {
/* Need to set up an input pipe. */
dup2(pipefd[0], 0);
- 09-21-2010 #2
If you run your program using strace, it will trace and report all system calls to stderror.
"I'm just a little old lady; don't try to dazzle me with jargon!"


Reply With Quote
