Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-28-2013, 10:01 AM   #1
LQ Newbie
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
how system calls is used? and hw can it be demonstrated in c?

how can we demonstrate following system calls in C??
<sys_clone,sys_setdomainname, sys_mprotect, sys_modify_ldt, sys_uname, sys_adjtimex, sys_sigprocmask>

Last edited by anji; 07-28-2013 at 10:02 AM.
Old 07-28-2013, 11:27 AM   #2
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060Reputation: 1060
You generally do not want to invoke sys_calls directly; there are library functions or utility programs that are designed specifically to be used in place of sys_calls and you really want to use those instead (they all have manual pages that explain how to use them).

For example, the clone() function is explained in the manual page, man clone; the manual page also includes a description of sys_clone call -- carefully read the manual page(s) before you start experimenting.

In most cases, the Linux library functions or utility programs are also supported on other platforms (notably Unix platforms); however:
The clone() and sys_clone calls are Linux-specific and should not be used in pro‐
grams intended to be portable.
Thus, the use of either should be avoided both for portability reasons and that they may not be available in future versions of Linux.

Take a look at the manual pages for the functions you're interested in (such as man clone, man setdomainname, etc.).

You may also find it useful to use Google to find examples of their use.

Hope this helps some.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how does java calls the system calls which are written in c babu198649 Linux - General 3 12-05-2011 03:40 AM
System Calls AlbertJJ Programming 7 10-27-2010 09:45 AM
system calls with C khodeir Programming 4 03-12-2009 08:26 PM
LXer: RandR 1.3 Explained, Demonstrated LXer Syndicated Linux News 0 02-08-2009 02:50 PM
Some system calls Spooky Programming 1 11-24-2004 10:17 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration