Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

So I get system calls in the context of a C program, but my textbook doesn't really address making system calls in Terminal (on Mac OSX). Can you do these on the command line like with "commands", or is it a totally different concept? Sorry, I'm sure this is very elementary, just can't find an answer.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

No, you can't perform system calls directly because the shell running under Terminal doesn't give you low level access to memory that you would need to call system calls and deal with the results. The shell's job is to make it easy for you to run whole programs. Some of these programs give you a more convenient interface to system calls and other operating system resources. For example, the mv command gives you a pleasant interface to the rename system call. The ln command gives you an interface to the link and symlink system calls. The built-in shell command cd gives you convenient access to chdir. But for the most part system calls provide services too basic to be useful for the shell to provide direct access to them.

share|improve this answer
    
makes sense. thanks. –  Marty Feb 6 '12 at 7:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.