The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
350 views

Why system call hooking produces different result everytime in Linux/Android 2.6.29?

I have implemented system call hooking for Android 2.6.29 kernel through a LKM module. I am tracing down one Android app for system calls. But interestingly, it returns different results every time I ...
2
votes
1answer
37 views

What is the use of “magic arguments” in Linux reboot system call?

As I was reading Linux source code, and more specifically the system calls code, I came across sys_reboot implementation: http://lxr.free-electrons.com/source/kernel/reboot.c#L199. 199 ...
1
vote
1answer
37 views

System calls in linux

Generally, systems provide a library or API that sits between normal programs and the operating system. On Unix-like systems, that API is usually part of an implementation of the C library (libc), ...
2
votes
2answers
48 views

Low level system call [closed]

C provides library functions such as write(),read().. for system calls.How to make a system call without using any library in linux in C ?
0
votes
3answers
36 views

System calls source code

C library provides functions such as write(),read(),open()...that we can use in our C program to make system calls. where can I find source code for these functions?
1
vote
0answers
16 views

difference between system-call, vm-call and hypervisor-call [closed]

What is the difference between system-call, vm-call and hypervisor-call in a virtualized environment?
0
votes
1answer
19 views

Process's father after setpgid(0,0);

I have a process P1 (child of some parent process P0) both in the same process group. P1 somewhere in his code runs: setpgid(0,0); then a new process group is created (where the group leader is P1). ...
5
votes
3answers
3k views

Difference between system calls and library functions

I have been through the answer of this question but do not quite understand the difference between system calls and library functions. Conceptually, what is the difference between the two?
9
votes
2answers
243 views

How a piped shell programs balance their output/input rates? [duplicate]

Possible Duplicate: Bash while loop and reading from pipe I come from web programming background, and find myself interested in one peculiarity of using a local shell. I understand that ...
3
votes
1answer
36 views

Get device with major number 0 (btrfs subvolume)

When I stat a file on a btrfs subvolume I get a major device number of 0. Is there a reliable way to find the mount point of this device, without knowing in advance it is a btrfs subvolume? e.g. I'd ...
14
votes
5answers
43k views

How to find application's path from command line?

For example, I have git installed on my system. But I don't remember where I installed it, so which command is fit to find this out?
9
votes
5answers
1k views

What is meant by “a system call” if not the implementation in the programing language?

I would like to understand the term "system call". I am familiar that system calls are used to get kernel services from a userspace application. The part i need clarification with is the difference ...
2
votes
2answers
2k views

Calculating total CPU system usage in C [closed]

I found this answer on StackOverflow for calculating total CPU usage: http://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process-in-linux/4497769#4497769 But how do I calculate ...
1
vote
1answer
41 views

Capture information of system-call

I have a QEMU-KVM hypervisor (ubuntu) with several VMs. What I want to do is capture all information of VMs system call to hypervisor (without any intervention to VM whatsoever) in real time within a ...
1
vote
0answers
50 views

Passing data from kernel space to user space in FreeBSD [closed]

I need some information regarding write requests from all applications on FreeBSD. I put a function inside the file system write call ffs_write() which collects the information into an array of ...
2
votes
2answers
161 views
1
vote
1answer
104 views

Too Much System Time

I have observed that when running CESM (a weather modeling application), the top command shows a great deal of time is spent on system calls, about 25% to 60%, and only 40% to 75% is used in user ...
3
votes
1answer
48 views

Result from kernel returned to what process?

When a process requires actions that require kernel mode, it uses a system call. So, how are the results returned to the process?
2
votes
3answers
125 views

In what shared library is read()?

I'm a Linux rookie and want to know where the system call read() is. Which shared library is linked when I call read()?
1
vote
2answers
67 views

How to notice log file changes with Linux standard tools? [duplicate]

I need something that does not need to be installed. It's on an embedded system with very little space on the HD. I can't instal anything. I need to do it with something that is already included. I ...
3
votes
3answers
121 views

API with no system calls

The book 'Understanding Linux Kernel' says that 'for something abstract such as math functions, there may be no reason to make system calls'. Can any one please explain how is a system call not ...
0
votes
1answer
217 views

Occasional error from bash on AIX: Interrupted system call

I am experiencing problems with process substitution in bash on AIX It happens very rarely, apparently only when the server is loaded. An example error message is: line 9: /tmp//sh-np-7841523: ...
5
votes
3answers
254 views

How can you change the process name of Wing IDE from python to something more descriptive

In my process list under Ubuntu (using top/System Monitor) one of the largest memory hogs (200+Mb) was python. I searched a bit for one of my programs to be the cause until I realised this was my ...
0
votes
1answer
133 views

what is a Kernel? [closed]

I'm learning Unix from the Unix Architecture book by Maurice J Bach. So if my question seems too stupid, please do bear with it. I read a few related questions but I would like a more simple ...
9
votes
2answers
2k views

Interruption of system calls when a signal is caught

From reading the man pages on the read() and write() calls it appears that these calls get interrupted by signals regardless of whether they have to block or not. In particular, assume a process ...
1
vote
0answers
63 views

Which Unixes support cross-device filesystem links (in particular for rename)?

Just read the following on the FreeBSD man page for the rename syscall: ... [EXDEV] The link named by to and the file named by from are on different logical devices (file systems). Note that ...
1
vote
1answer
43 views

What is a channel?

http://www.di.uevora.pt/~lmr/syscalls.html In that reference about system calls, appears a function called dup(). It is said that it duplicates channels. Then my question is, what is a channel?
0
votes
1answer
46 views

Which System Call provides an interface for sending messages to devices? [closed]

Question is above. I've looked through the man pages, but they are somewhat unclear on the topic. I'm not sure if I'm looking for sendmsg() or msgsend() or if I'm looking for something totally ...
19
votes
2answers
2k views

Where is the fork() on the fork bomb :(){ :|: & };:?

Warning: Running this command in most shells will result in a broken system that will need a forced shutdown to fix I understand the recursive function :(){ :|: & };: and what it does. But I ...
3
votes
2answers
967 views

Which file in kernel specifies fork(), vfork()… to use sys_clone() system call

When ltrace is used for tracing the system calls, I could see that fork() uses sys_clone() rather than sys_fork(). But I couldnt find the linux source where it is defined. My program is ...
12
votes
2answers
886 views

Equivalent of “truss -T” and “truss -U” on Linux?

Is there an equivalent of what the -T and -U option of the truss Solaris utility does on Linux. Those are to specify a system call (-T) or library function (-U) which when called by the traced ...
8
votes
4answers
2k views

Why should a child of a vfork or fork call _exit() instead of exit()?

From the man page of vfork(): vfork() differs from fork() in that the parent is suspended until the child makes a call to execve(2) or _exit(2). The child shares all memory with its ...
5
votes
2answers
88 views

Making a process read a different file for the same filename

I have an application that reads a file. Let's call it processname and the file ~/.configuration. When processname runs it always reads ~/.configuration and can't be configured differently. There are ...
3
votes
3answers
730 views

Command to trace rsh server to check behaviour of particular system call

I am working with rsh. I want to check the whole process from beginning to end. For that I used strace. Os name is CentOS. I am working on single machine, server and client are on same machine. My ...
0
votes
0answers
260 views

Tracing system call on Ubuntu 12.04

The main task I have to carry out, is to trace the system call of processes in ubuntu 12.04 LTS. Problem is, I am unable to trace them continuously, i.e. as soon as they are added to the system, they ...
-1
votes
1answer
91 views

System call tracing [closed]

I am working on system call tracing for host based IDS, i need to trace a process as soon as it entered in the system (a new entry in /proc). Is there any interrupt or signal or kernel datastructure ...
-1
votes
2answers
60 views

Importance of knowing if a standard library function is executing a system call [closed]

Is it actually important for a programmer to know if the standard library function he/she is using is actually executing a system call? If so, why? Intuitively I'm guessing the only importance is in ...
0
votes
1answer
148 views

Understanding a XINU system call - getstk.c [closed]

I am having trouble conceptually understanding what is going on towards the end of this system call, and why. I understand the getstk.c method returns the highest memory address of available space, ...
15
votes
4answers
2k views

How to understand pipes

When I just used pipe in bash, I didn't think more about this. But when I read some C code example using system call pipe() together with fork(), I wonder how to understand pipes, including both ...
2
votes
2answers
950 views

exec() and system() system calls

I do understand that while exec() does not return after it executes in Unix ,system() may or may not return depending on the situation.But can anyone explain why exec() system call does not return and ...
2
votes
1answer
414 views

How to decode cmd = 3222823425 in ioctl in Linux 2.6.29

I am just confused like how can I break cmd=3222823425 value into different parts to figure out what this command means actually in the Linux kernel. I know, some functions are making ioctl command ...
3
votes
1answer
657 views

Program stall under user but runs under root

I am running R job under a normal user john and root. Interestingly, the program stalls under john user but runs quickly under root. Using strace, I found that when john runs the R, the process stalls ...
8
votes
3answers
4k views

flock(2) versus fcntl(2) over a NFS

The Perl 5.x documentation states that its implementation of flock(..) will use one of the following native calls, starting at 1 and working toward 3 if unavailable: flock(2) fcntl(2) lockf(3) ...
1
vote
1answer
82 views

What means the “integer argument” in system call descriptions? [duplicate]

Possible Duplicate: What do the numbers in a man page mean? All system calls described in manpages have an associated number such as exec(3). What is the meaning of this number?
3
votes
1answer
131 views

how to disallow user to change process group

Is it possible to restrict a process from changing it's process group? For example, user nobody seems to be able to call setpgid(0, 0) which sets process group of current process to pid of that ...
3
votes
2answers
2k views

Adding a new System call to Linux 3.2.x with a loadable kernel module [closed]

I want to add a particular new system call in the linux kernel 3.2.x but as a loadable kernel module (as I don't want to recompile the kernel again and again) I read through many posts on internet ...
3
votes
1answer
134 views

Efficient mechanism to determine if open file has been externally modified?

For example, the IDE I'm using at the moment (Aptana Studio) notifies me as soon as a file's contents it has open have been changed by some external program. I can imagine having a periodic loop run ...
0
votes
0answers
472 views

adding system calls to kernel without recompiling during implementation

Could anyone tell me if it is possible to add several system calls to the linux kernel (version 2.6.35) and not have to recompile the kernel each time I change one of their implementations (i.e. ...
4
votes
2answers
2k views

How to find the header file where a c function is defined?

Is there an easy way to find out which header file a C function declaration is in? cding into /usr/include and running (grep -E 'system.*\(' *.h -R) works with some trial and error, but isn't there an ...
3
votes
4answers
2k views

Understand error codes in Linux

I am working on Linux (Kernel Version 2.6.32.28) laptop. After I inserted/did file io/removed a SD combo card, I got following errors: mmcblk0: error -123 sending status command mmcblk0: error ...