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
0
votes
1 answer

How to find Printer URI using CUPS

Anyone know to get a printer URI using CUPS API? If not, does anyone know where I can find a list of allowable options that can be passed to cupsGetOption function. Right now I can only find printer-info, printer-location, printer-make-and-model. …
trueinViso
  • 1,354
  • 3
  • 18
  • 30
0
votes
1 answer

Pass long values from forked process to its parent

I want to pass a value of type float, double, long from the child process to the parent. I fork the parent first then wait for the child to end its job and here I want the child to return a big value (of type long int). I found a way to pass normal…
Ibrahim.I
  • 229
  • 1
  • 4
  • 18
0
votes
1 answer

An assembly code used array

int A[R][S][T]; int A[R][S][T]; int store_ele(int i, int j, int k, int *dest) { *dest = A[i][j][k]; return sizeof(A); } Gcc generates the following assembly code : 1. movl 8(%ebp), %ecx 2. movl 12(%ebp), %eax 3. leal (%eax, %eax, 8),…
anna
  • 79
  • 1
  • 9
0
votes
1 answer

How do I get Linux hardware and system info via a C library?

I'm trying to implement a system which sends via Bluetooth sockets, information about the current system (in fact, a Linux server). This back-end code is in C. I'd like to know if there's an available library to get info like cpu temperature, disk…
aajjbb
  • 91
  • 1
  • 9
0
votes
1 answer

How can I print all directories and the files under those directories?

I am searching directories in current directory and if I accross a directory , I got in and search directories and files again but I cannot find the problem.I always get the same result and some specific directories. In code I get directories name…
Sabri Meviş
  • 2,231
  • 1
  • 32
  • 38
0
votes
1 answer

use the device after lock it by FSCTL_LOCK_VOLUME win32 api control code?

how can i use the device after lock it by FSCTL_LOCK_VOLUME win32 api control code for example listing files in the device or delete files from the device and etc . i can list all files by FindFirstFile() and FindNextFile() when the device isn't…
0
votes
1 answer

how same key is used across processes to communicate each other using shared memory

I learned that it is necessary to use same key in both two processes to communicate using shared memory. In sample code I've seen , the key is hard coded in both programs(sender,receiver). My doubt is in real time how two unexpected processes use…
Siva Sankaran
  • 1,521
  • 4
  • 21
  • 40
0
votes
1 answer

Convert a float into a string in c

I am writing a function that will be passed a float in the form of a void pointer. What I am attempting to do, is convert that float into a string equivalent so that I might save that binary data in memory. For example, the call to my function is as…
kubiej21
  • 700
  • 4
  • 14
  • 29
0
votes
2 answers

How to store binary value of a long at a pointer?

I have a void pointer that I would like to store the binary value of a long at. For example: void * p; long number; p = malloc(16); p = memset(p, 0, 16); number = 15; /* PRINTS FIRST 16 BYTES */ for(i = 0; i < memSize; i++) printf("%02x",…
kubiej21
  • 700
  • 4
  • 14
  • 29
0
votes
1 answer

Finding end of char pointer, int and float

I have a function that will be passed a void pointer. This pointer can either be an int, char, or float. I know what data type will be passed to me by means of an associated value. For example, below is what my function looks like: void * (int type,…
kubiej21
  • 700
  • 4
  • 14
  • 29
0
votes
2 answers

piping two times using fork in C linux

I am trying to rewrite a c program that do something like ls|wc|wc , I already did it for ls|wc , it worked fine, but I can't figure out why my program stops at the child in the indicated line. please help! int main (void) { pid_t pid_fils,…
0
votes
5 answers

gdb like printing of a pointer to a struct

I need a way to have gdb like output for a pointer to a structure which shows all the fields and its addresses and the corresponding values. Is there a clean way to do this instead of printing it member by member. I cannot use any other external…
user138645
  • 772
  • 1
  • 7
  • 18
0
votes
1 answer

Server-Client Named Pipes Buffer size

I wrote a simple server-client program in which server and client are communicating using named pipes.Everything is working fine,but i have a simple question: In the client part i allocate the msg that is going to be sent to the server in this way …
Spyros
  • 682
  • 7
  • 18
  • 37
0
votes
0 answers

system call during pipe lining of two commands in unix

when we write ls -l | wc -l command on terminal what system calls are made internally at kernel level?? and How can we verify all those system calls made.
Rahul Kumar Dubey
  • 788
  • 1
  • 6
  • 19
0
votes
1 answer

Can't read file in inherited process

I'm trying to read the file in inherited process, the file handle which I passed through command line is valid, but GetFileSize(HANDLE,LPDWORD) returns 0. #include"mainClass.h" MainClass* MainClass::ptr = NULL; MainClass::MainClass() { ptr =…
Mickey Tin
  • 3,408
  • 10
  • 42
  • 71