Tag Info

New answers tagged

3

Sure, let's do the how-many-directions-can-we-look-at-this-elephant-from? thing. The actual system call is, in your built program, the machine instruction that triggers the privilege escalation into kernel mode, and in the kernel itself it's the code that instruction invokes. The libc code (and every language runtime) sets up the machine registers and ...


4

A system call is a way to ask your operating system (kernel) to do some operation on behalf of your program, that the program can't do by itself (or is just inconvenient). The reason for not being able to do some operation is normally that allowing a random program to do them might compromise the integrity of the system, like doing I/O (directly to RAM, ...


3

In Linux at least the system call mechanism works under most architectures by placing some specifically formatted data (usually some kind of c struct) in either some registers or predefined memory addresses. The issue comes however in actually forcing the CPU to do the switch into kernel space so it can run the privileged kernel code to service the call. ...


13

System calls per se are a concept. They represent actions that processes can ask the kernel to perform. Those system calls are implemented in the kernel of the UNIX-like system. This implementation (written in C, and in asm for small parts) actually performs the action in the system. Then, processes use an interface to ask the system for the execution of ...


2

Which is the most portable of sed, awk, perl and sh? sed, sh and awk are portable being specified by POSIX, perl is not as not being backed by a standard. Can someone put these tools in order of portability? If you stick to compliant code, there should be no order of portability for the three POSIX commands. Which of these is certain to be ...


6

Take a cue from the Autotools: stick to the lowest common denominator of Bourne and POSIX shell — possibly augmented by sed — if you have to write something that must work everywhere. There may exist systems where something breaks, but you can work around such problems by rewriting. For example, some ancient systems have problems with expansion ...



Top 50 recent answers are included