Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
112 views

I'm on my way to create a simple terminal. I have the following code to test bidirectional piping, where the parent process should only attempt to write when the child process expects it, however at ...
mltm's user avatar
  • 605
0 votes
2 answers
80 views

I'm on Windows OS and in the past month I used to compile a C/C++ project in Qt Creator IDE using MinGW's gcc/g++ compilers based on POSIX thread model, i.e. compilers that were built with the option -...
ahahfilip's user avatar
1 vote
2 answers
77 views

POSIX.1-2017 specifies two line-oriented file editing utilities: ed(1) and ex(1). ex is more efficient for noninteractive batch-editing because POSIX requires it to accept one or more file operands, ...
edcsnt's user avatar
  • 45
-1 votes
1 answer
138 views

In R package development (on Linux) with configure scripts, using shebang in the first line of the configure file as recommended and making the script configure executable via "chmod u+x ...
qms's user avatar
  • 51
3 votes
1 answer
97 views

I need to use robust mutexes for IPC in case one of my processes crashes while holding a mutex locked. Definition is clear from e.g. man pthread_mutexattr_setrobust and I will not repeat it here. I ...
toxic's user avatar
  • 600
0 votes
1 answer
78 views

I have noticed some embedded environments do not support the header netinet/in.h in C/C++ projects. Typically, they have some other header which defines a sockaddr_in struct in its place (e.g. in the ...
notgapriel's user avatar
1 vote
1 answer
101 views

I've been researching the POSIX specifications and I'm a little confused by them as to what they define as a syscall. Lets take fork() for example I know it got to be in the C library but I'm a ...
robertapengelly's user avatar
11 votes
1 answer
263 views

Suppose I want to set a thread to use a particular real time scheduling policy with a given priority. From what I can tell, there are at least two functions that accomplish this. From the man pages on ...
Oliver K's user avatar
  • 129
0 votes
0 answers
15 views

I am trying to figure out what exactly the POSIX specification stipulates for how characters are being processed in canonical mode. See https://pubs.opengroup.org/onlinepubs/9799919799/ chapter 11 &...
sh-'s user avatar
  • 1,031
0 votes
1 answer
105 views

Here's what I'd like to do: Process a .gcode file to extract certain data and then create a .csv file containing all this data. For your information, this .gcode file is used on a 3D printer or laser/...
GilbertOOl's user avatar
  • 1,315
1 vote
0 answers
84 views

From Linux/glibc, I have run some simple experiments to test how all char values are treated by std::tolower(int) -> int and std::tolower(char, std::locale) -> char. For my locale, I was ...
kevinarpe's user avatar
  • 21.6k
0 votes
2 answers
65 views

This applescript allows me to extract the text I'm interested in from a .gcode file but actually creates a copy of the file before modifying the original file. I would like to save the file without ...
GilbertOOl's user avatar
  • 1,315
3 votes
1 answer
69 views

The signal handler passed in sa_sigaction to sigaction receives an int signal id as parameter, but the context info received as second parameter contains the signal id as field again. Is there a good ...
feldentm's user avatar
  • 206
-1 votes
1 answer
134 views

On Linux, does ln --force atomically overwrite the target? In other words, during the time that ln --force runs, is it guaranteed that the file system is always either in the original state or in the ...
Jo Liss's user avatar
  • 33.8k
0 votes
1 answer
57 views

I wonder if I may use comments in between POSIX shell script's function name and its body? This appears not to throw any problem in shellcheck and runs in Dash / Bash, but searching for this ...
Vlastimil Burián's user avatar
0 votes
0 answers
20 views

public static void SetFilePermissions(string filePath, FileAccessPermissions permissions) { try { var fileInfo = new UnixFileInfo(filePath); fileInfo.FileAccessPermissions = ...
Jacek Sniadecki's user avatar
4 votes
0 answers
80 views

There is a limited number of functions that POSIX defines as async-signal safe. See here. This includes some fundamental functions such as write. Since this is really a C standard (since unix is built ...
Daniel's user avatar
  • 391
3 votes
1 answer
68 views

I was making a return value check, but then I read the source code and found out that the function doesn't return the error, but just may or may not generate it (via XFreeGC(), I guess) and you will ...
iloveclang2's user avatar
1 vote
0 answers
110 views

I'm trying to write my own terminal shell in C and want to know how I can register arrow-up and arrow-down presses to populate the current input line with a previously entered line? I'd like to do ...
bryce's user avatar
  • 11
3 votes
2 answers
187 views

I'm wrapping a terraform binary in a script, as a part of an enterprise solution. Therefore I need to take care of: file log capture (separately STDOUT, STDERR for some post-processing analytics) ...
Bernard Halas's user avatar
3 votes
1 answer
71 views

I am trying to understand the signals in POSIX/Linux. I wrote this test.c program: #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> void handler(...
nowox's user avatar
  • 29.7k
2 votes
0 answers
130 views

I'm trying to do an exercise from Advanced Programming in the UNIX Environment where I need to: Open a file that contains a counter. Fork a process. Have the parent and child increment the counter ...
SekstusEmpiryk's user avatar
4 votes
3 answers
305 views

My code uses nanosleep(). It compiles fine. And now if I try to compile it with -std=c23 flag, nanosleep() isn't recognized. Any other major C standard version doesn't work. I tried using various ...
Programmer_2147483647's user avatar
13 votes
4 answers
1k views

While researching on file I/O in C, I came across two functions: fgetc() and read(). //code1.c #include <stdio.h> int main(void) { char ch; ch = fgetc(stdin); return 0; } //code2.c #...
John's user avatar
  • 148
4 votes
0 answers
107 views

Issue Description: When using the dlopen(), static variables inside a class are shared across the process. This means that when the shared object is loaded multiple times, it does not have an ...
CoderCPP's user avatar

1
2 3 4 5
125