Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [posix]

The tag has no usage guidance.

-1
votes
1answer
56 views

Creating a “lite” version of shared library on Linux/POSIX in addition to full version

I have a large shared library, a collection of functions created from numerous .a files into libeverything.so. The code for the .a files is obviously compiled with -fPIC. I also have libeverything.a ...
0
votes
2answers
270 views

copying of memory vs pointer to memory in real time systems

While working in a multi-threaded environment, then data sharing seems to be a good option to pass data between threads. While working with real time systems it is apparently advisable to go with ...
3
votes
1answer
194 views

Simple solution for calling a function only on one thread, queuing waiting calls?

Let’s assume there is a function EventHandler that is called on multiple threads at different points in time. EventHandler has to call SomeOtherFunction, but these calls shall only happen on one ...
1
vote
1answer
605 views

What know the advantage of POSIX queue or just normal data structure queue?

I'm programming with the embedded device running Linux, where memory is less, I just have 64MB flash only. I planned to use queues for the thread communication. In which I came across with using ...
1
vote
2answers
47 views

Can packet sizes be relied upon in TCP/IP, at least for the first read() call on a connection?

Assume you have a client application which is known to connect to a given IP, and send a fixed size message (of size X = ~dozen bytes) upon connection, and wait for a reply. If you're writing a ...
2
votes
2answers
134 views

algorithm for shell language interpreter to find if a char is between quotes

Assume we have a string s (a C char *) that is a program in a language L. I want to parse L and know the following from the specification The following characters must be quoted if they are to ...
-2
votes
1answer
231 views

For loop and recursion for a new shell in C [closed]

I code a new shell in C, that could be done in several ways: Flex/bison, finite state machine, abstract syntax tree or just a tokenizer in C. Now I've written a for-loop that changes the condition of ...
0
votes
1answer
227 views

Using syscalls to read files - is this bad?

I have some (presumably stable) legacy C code that uses POSIX system calls to read binary files. It's nothing more than creat(), read(), and write(). The program doesn't sit close to the metal at all (...
10
votes
2answers
496 views

Why do programmers define programming models to replace C/POSIX for parallelism?

Providers of new computer architectures regularly try to introduce new programming models, e.g. recently CUDA/OpenCL for GPGPUs, and displace C/POSIX as the control interface to platform ...
2
votes
3answers
421 views

long (or bizarre) file paths

I know that (on Linux at least, with native file systems like Ext3) file paths can in theory be quite long, and PATH_MAX is often (but not always) as big as 4096 (see this; and this explains it could ...
2
votes
1answer
92 views

Ensuring reliability of cross-compilation

Provided that my code is fully standards compliant with no undefined behaviour, how can I best assure that it will be possible to cross-compile my software for any architecture? I had some ideas, but ...
8
votes
1answer
5k views

Proper way of handling EINTR in libraries

What is the recommended etiquette when it comes to EINTR in libraries? I'm currently writing a function that does some file system tasks with the POSIX API, but a lot of the calls I use can ...