Questions tagged [systems-programming]

System programming is the activity of computer programming system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce software which provides services to the user, whereas systems programming aims to produce software which provides services to the computer hardware.

Wiki:

System programming is a kind of computer programming which is intended to design a system software. Systems programming is used to produce such softwares which provide services to the computer hardware. thus It requires a greater extent of hardware compatibility.

Implementing certain parts in operating system and networking requires systems programming, for example implementing Paging (Virtual Memory) or a device driver for an operating system. A System programming language like C, PL360, BLISS, D is usually used to for systems programming".

Usage:

The tag can be used for all system programming related problems. Stackoverflow is a question-answer website for programming related problems, for theoretical and other problems you can ask your system programming problems on https://www.superuser.com and https://programmers.stackexchange.com/

Read more:

408 questions
1
vote
0 answers

Flash Emulation library - Trapping memory write access

I am required to write a library (in C++) which will emulate NOR flash like behavior. (Platform - Windows, Language-C++) (Sorry for a very long post, I am trying to explain what I have done so far :) ) Required behavior: So, this is how its…
Microkernel
  • 1,347
  • 4
  • 17
  • 38
1
vote
1 answer

DBUS Server Crashing

I am implementing a DBUS object with Glib bindings and am having problems with returning GArrays: gboolean TestObject_get_data(TestObject* obj, GArray* buffer, GError** error) { int i; printf("%s Entering\n", __PRETTY_FUNCTION__); …
waffleman
  • 4,159
  • 10
  • 39
  • 63
1
vote
5 answers

Conversion: uid_t to string, off_t to string

I am currently writing a systems programming homework and in one part i need to get some information of a file in a directory. for the stat of file, we have ctime() function which converts time_t type to string and returns a pointer to it. but how…
israkir
  • 2,111
  • 7
  • 30
  • 39
1
vote
1 answer

BPF: sock_ops equivalent for UDP sockets

BPF_PROG_TYPE_SOCK_OPS is a BPF program type which is called when a set of actions is performed on a TCP socket. Right now, I am using it to mark TCP sockets that are trying to connect with an fwmark. I want to do the same for UDP sockets, but…
1
vote
1 answer

How to fix the following malloc error in my code?

I am trying to write a program to connect a client and a server using a FIFO on Linux and then when the client sends a message to the server, the server prints that message to the console. Now I designed the program as follows: When the client types…
1
vote
1 answer

System wide right click context hook

**Hello.. i am creating English To Gujarati Dictionary WinForm Application. I need to set a system wide hook to the right click context menu on for text selection. it means when this application is running,and if user selects word…
aarti
  • 175
  • 2
  • 15
1
vote
1 answer

Changes to PostgreSQL source code

I was working around with Postgres a bit. I am trying to get familiar to editing the source code of the same. One of the suggested exercise was to change the buffer replacement policy of the system of Postgres 7.4. (It was in one of the homeworks…
user723556
1
vote
0 answers

Linux Single Fork Daemon. How to reacquire a controlling terminal?

Everyone says that daemon should not have a controlling terminal. And double-fork method is the correct way that a double-forked daemon will never acquire a controlling terminal since it's not a session leader. However, if we create a single fork…
The Dongster
  • 337
  • 1
  • 3
  • 15
1
vote
2 answers

Applications of system() function in launching and waiting for a new process

I am currently learning System Programming and came across the usage of int system(const char* command) in the chapter Process Management. They say that if a process is spawning a child, only to immediately wait for its temination, it is better to…
ABINESH
  • 43
  • 5
1
vote
2 answers

Impact of zombies processes on an embedded linux

I'm developing a program (Grand parent process) that automatically relaunch a process (parent process) that calls two other processes (children processes) in case of errors. If one of the children processes misbehave, the parent process try to close…
JDoe
  • 15
  • 5
1
vote
0 answers

CSAPP 3rd edition practice problem 8.8, using signal handlers

The following code is taken from practice problem 8.8 from CS:APP3e on page number 809 volatile long counter = 2; void handler1(int sig) { sigset_t mask, prev_mask; Sigfillset(&mask); Sigprocmask(SIG_BLOCK, &mask, &prev_mask); /*…
1
vote
3 answers

Windows System Programming

I'm really excited to learn system programming on the windows platform. I just started reading "Programming Windows Fifth Edition" and I noticed that it's mostly GUI-Oriented. Excuse me for a maybe-dumb question, but isn't all this can be used in…
1
vote
1 answer

Can a read() or write() system call continue where it left off after being interrupted by an EINTR signal?

ssize_t ret; while (len != 0 && (ret = read (fd, buf, len)) != 0) { if (ret == -1) { if (errno == EINTR) continue; perror ("read"); break; } len -= ret; buf += ret; } I am wondering how this code can continue where it left…
Kamil Kaya
  • 47
  • 5
1
vote
1 answer

Sending data from parent to child through sigqueue

int sigqueue(pid_t pid, int sig, const union sigval value); union sigval { int sival_int; void *sival_ptr; }; The parent decides to use memory from its heap and sends the shallow copy of data (sending address of data through sival_ptr) to…
1
vote
1 answer

Where did the zombie process go?

int main() { pid_t pid; printf("Parent: %d\n", getpid()); pid = fork(); if (pid == -1) { perror("fork"); goto clean_up; } else if (pid > 0) { sleep(3); } else { printf("Child…