SYSCALL(2) BSD System Calls Manual SYSCALL(2)NAME
syscall -- indirect system call
syscall(int number, ...);
Syscall() performs the system call whose assembly language interface has the specified number with the specified arguments. Symbolic con-
stants for system calls can be found in the header file <sys/syscall.h>. This function is useful for testing new system calls that do not
have entries in the C library.
The return values are defined by the system call being invoked. In general, a 0 return value indicates success. A -1 return value indicates
an error, and an error code is stored in errno.
There is no way to simulate system calls that have multiple return values such as pipe(2).
The syscall() function call appeared in 4.0BSD.
4th Berkeley Distribution June 23, 2008 4th Berkeley Distribution
Check Out this Related Man Page
SYSCALL(2) Linux Programmer's Manual SYSCALL(2)NAME
syscall - indirect system call
#define _GNU_SOURCE /* or _BSD_SOURCE or _SVID_SOURCE */
#include <sys/syscall.h> /* For SYS_xxx definitions */
int syscall(int number, ...);
syscall() performs the system call whose assembly language interface has the specified number with the specified arguments. Symbolic con-
stants for system calls can be found in the header file <sys/syscall.h>.
The return value is defined by the system call being invoked. In general, a 0 return value indicates success. A -1 return value indicates
an error, and an error code is stored in errno.
syscall() first appeared in 4BSD.
main(int argc, char *argv)
tid = syscall(SYS_gettid);
SEE ALSO _syscall(2), intro(2), syscalls(2)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2007-07-26 SYSCALL(2)
I have a question regarding the recv syscall.
Suppose I have a client/server and the following exchange of message took place:
Client --> Server using multiple send syscalls one after another immediately:
Server receives in the... (2 Replies)
Hello, I have problems finding clear information about the use of select(). I want to write an application, and for that I need to be sure about the functions behaviour. So to ensure, that I understood it all correctly I make some statements or questions. So a qualified answer could just be: yes,... (13 Replies)
i just started started learning system programming and want to pursue a career in the sys prog area.
below is the program that use a fork() call.
i read in one of the tutorials that parent process and child process uses different address spaces and runs concurrently.
that meas each... (2 Replies)
I am using ptrace to keep track of clone syscalls in a program. However, I found that the traced syscall cant be paired. for example, there are some syscalls that have entry, but without exit showing up in the traced sequences. So, is there anyway to distinguish the entry and exit of a... (0 Replies)
This is the gdb backtrace.
Program received signal SIGINT, Interrupt.
0xffffe424 in __kernel_vsyscall ()
#0 0xffffe424 in __kernel_vsyscall ()
#1 0xb7e56a70 in __nanosleep_nocancel () from /lib/libc.so.6
#2 0xb7e568bb in __sleep (seconds=0) at sleep.c:138
#3 0x080496d5 in... (6 Replies)
I'm trying to compile a program called varkon, but after I chose an option from the main screen it gives me a segfault. The code is to long for me to go through it all, so I tried using gdb.
This was the output:
Reading symbols from /home/oliverj/Downloads/varkon/bin/xvarkon...(no debugging... (5 Replies)
I saw somewhere that describe read() as a primitive. But when I lean signals, it says the read() may be interrupted by a signal.
1, What is the diffence between primitive and reentrant?
2, Is read() a primitive or reentrant?
3, Are all system calls primitive or reentrant? (2 Replies)
We have just enabled core dump on our RHEL5.7 OS. the java process is terminating very often so we enable core dump to analysis the issue and find below in core dump file.
Core was generated by `/usr/java/jdk1.6.0_06//bin/java -server -Xms1536m -Xmx1536m -Xmn576m -XX:+Aggre'.
Program... (0 Replies)
If a Solaris process is calling some syscall, and right now execution is inside syscall doing only CPU work, for example the inside simplest times syscall,
<< we are here now, we have entered in the times, but not exited yet
<- app_func... (9 Replies)
I wanna add my own system call to Fedora 18 kernel 3.8.2.
From kernel 3.3 I heard there is a new system to add system calls.
So where i can find a guides ?
I wanna print this text: "Hello world!" in terminal, not dmesg. (4 Replies)
Hello to all
I want download a file in osx intel 64 with NASM , I want to use socket syscall
This is part of my code
command db "GET /test/2.gif HTTP/1.1\r\nHost: 10.1.1.187\r\n\r\n", 0
; url db "http://172.16.207.153/test/2.gif", 0
global main... (1 Reply)
When I use this command:
purify gcc -g hello_world.c
to instrument a C program with Purify, I get this error :
Purify engine:Error: The /usr/lib/syscalls.imp file either does not exist or has incorrect permissions.You may need to install bos.adt.syscalls
I understand that I need to install... (11 Replies)
I am getting SSL_ERROR_SYSCALL in connection to qa-api.ncl.com:443. Please help me on this. But I am able to get response in Soap UI.
Please use CODE tags when displaying sample input, output, and code segments. (13 Replies)