Stack Exchange Network

Stack Exchange network consists of 174 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 [linux]

Linux is a popular, open source operating system kernel. Linus Torvalds started development of the kernel in 1991.

1
vote
2answers
127 views

Is it good practice to statically link libstdc++ and/or libgcc when creating distributable binaries for Linux?

Context: I have an open source project which uses JNI. While it's possible to build it yourself, I expect most users will use standard Java tools like Maven, Gradle, or SBT to download the JAR, which ...
0
votes
2answers
72 views

How to append a chunk of fixed size data to a file and make sure this chunk doesn't get fragmented on disk?

So i want to understand how DBMS implementation works To give an example : MySQL implements each tables with its own pages, which are 16KB so each table is a file, and is a multiple of 16KB, ...
0
votes
1answer
96 views

Why do we need nginx server on top of linux server?

Recently, I tried to deploy a web project to a virtual machine. I used the Ubuntu server as my OS, but while following along some tutorials I came to the fact which was very confusing for the beginner ...
2
votes
0answers
30 views

Create clean/blank MacOS filesystem for testing OSS

In developing/testing OSS libraries I can replicate a clean Linux fs using containers. However, if I want to test oss libs for MacOS end users, I seem to be in a bit of a quandary. Is there any way to ...
0
votes
1answer
34 views

Should worker processes accept() or should they get data from the master process?

I'm trying to write an application server in python. I have a master process and multiple worker processes created from the master using fork(). I have two approaches in mind about how the workers ...
1
vote
0answers
102 views

Daemon vs worker and when to use what?

(Note that, below, I am frequently using term "daemon or worker" just to indicate that I dont know which word to use as I dont know the exact difference between them in the context explained below.) ...
1
vote
3answers
376 views

Is an OS kernel a singleton?

In my understanding, a singleton design pattern is where we have only one instance of an object in a system. I am not sure on this part of the definition, but I believe in an OS there is only one ...
1
vote
4answers
206 views

What is the technical term for the modifiers that come after a command?

For instance: python3 -m What is the technical term for the "-m" ? And, where can I find a list of these "modifiers" that correspond to a command? Then, how would I find out what each of these "-...
2
votes
1answer
42 views

How can I maintain bash functions without brittle escaped newlines?

I have functions like this: foo() { /some/script \ --opt1=val1 \ --opt2=val2 \ --opt3=val3 } This is brittle if I take out the last option, or add any new option at any line. ...
-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
1answer
676 views

What is the difference between an Implicit loop and an Explicit loop [closed]

I'm doing an assignment in my Linux class and my teacher is a fill-in so he's just going with what is given to him. In the assignment it says to write a script using an Implicit loop to create file ...
-2
votes
1answer
55 views

Hardlinking Git Repo for Deployment: Possible Downsides?

I've got a production server I'm managing right now, but it's becoming incredibly inefficient to either: SSH into the remote server, and develop server-side Develop on my local machine and transfer ...
-2
votes
1answer
140 views

Linux Server Hosting through Cloudflare [closed]

I hosted a hobby NodeJS Server from my Linux and all is fine by accessing my direct IP. Because I find this ugly and also less secure, I decided to route my domain which is set to Cloudflare to my IP....
5
votes
1answer
101 views

Which registers should executable loader install before start a program?

For example, I have simple C program that only have main function that just returns 0. What registers should loader (Linux exec loader, I guess) install before start a program? I didn't find ...
1
vote
0answers
43 views

Installation directory for internal scripts

In GNU/Linux the recommended installation directory for internal binaries of a given package is /usr/lib or /usr/libexec. However, I can't find any recommendation for internal (non-binary) executable ...
3
votes
2answers
303 views

Version control of embedded OS system image

I'm working on a hardware product that contains an embedded Linux system. The majority of what we execute on that system is a set of Python code which currently has its own Git repository and is ...
0
votes
1answer
141 views

When working in a multi operating system team, what are some of the pitfalls to bear in mind?

I'm working in a team where there are several different OS present (windows, various linux distributions (Ubuntu, Mint) as well as Macintosh). Projects are passed around and we have already come ...
1
vote
1answer
86 views

Section of program needs root access

I have to perform a number of 'housekeeping' tasks that need root access (Linux, Debian). Generally one time only, but I do need to check that they have been performed. I don't really want to run the ...
4
votes
4answers
116 views

Developing for a wide variety of Linux Desktops

I haven't developed any production applications for the Linux OS. There are a couple of things that bother me: As I understand different distros have different set of libraries Debian vs RPM packages ...
1
vote
1answer
513 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 ...
-5
votes
4answers
184 views

Microsoft or Open Source? [closed]

Why do some companies prefer private Microsoft solutions when in the majority of cases there are open source solutions or free software for them? What does Microsoft offer that the open sourece or ...
2
votes
1answer
645 views

Project structure for cross platform?

How do I make a good project structure that allows me to work on Linux as well as Windows with Visual Studio? So far I've only been using my Linux machine when working on my project and I used this, ...
0
votes
3answers
988 views

Why do device drivers in Linux need to run in kernel mode?

Say I have a device that is connected to the computer through a USB port, and I created an application to communicate with this device. In this application I used the USB driver to communicate with ...
1
vote
0answers
108 views

Classiest file system locations for my Linux app to write its files?

I have an application I am writing on Linux. It is a Java webapp intended to be run on Tomcat. When it initializes, my application will copy some standalone java utility programs to the host ...
4
votes
3answers
578 views

Make multithreaded program asynchronous

There is an application that processes TCP/IP requests according to some logic, and pretty always it connects to DB. Architecture is very common: one client -> one processing thread -> one DB ...
0
votes
1answer
139 views

Windows Qt5-based app porting to Linux

I'm here today, because I'd like to ask you a question about porting application built with Qt5 to linux. I have been asked to port this application to linux, I don't yet have the source code, but I ...
2
votes
2answers
380 views

Ken Tompson Hack [duplicate]

I understand Ken Thmpson hack involved like someone has mentioned on here he hacked /bin/login to introduce a backdoor. he did this by hacking the compiler to introduce the backdoor into a binary ...
-5
votes
1answer
164 views

Is it true that Linux and Mac OS programs' source are interchangeable? [closed]

Is it true that most of the times source code for Linux programs can be compiled into Mac OS programs and vice versa?
2
votes
1answer
210 views

How does one person handle all?

I was reading a wiki article about DRM, and I found in the Development paragraph this: Torvalds, as top maintainer of the whole kernel, holds the last word on whether a patch is suitable or not for ...
1
vote
0answers
277 views

Low latency, multi-client producer/consumer. C++ on Linux

I am looking to replace a framework from the ground up. It works as it is, but I've been tasked with understanding it, so I want to know if anyone else recognizes any glaring design issues that I ...
2
votes
6answers
365 views

What are the benefits of storing data contiguously?

I am designing an application file format which will store chunks of user data, ranging from a few bytes to a few gigabytes - median size probably in the 10MB - 30MB range. I have the option of ...
6
votes
2answers
311 views

Best event based architecture for Linux to GUI

I've looked around a bit and probably haven't found the right medium for this question so let me know if there's a different forum I should bother. First, there is an application managed by another ...
2
votes
0answers
85 views

What are the benefits and drawbacks of running a UniKernel?

What are the Benefits of running a UniKernel. Isn't it more work to coordinate multiple UniKernels spinning up and down versus the traditional application? What pieces of Software will be rewritten ...
-1
votes
1answer
121 views

Azure storage local development

I want to try a whole bunch of azure services in my project. Now I facing a design problem for the development cycle. I want to test everything local and only it works I want to push it do azure. My ...
0
votes
1answer
93 views

Can a zombie process get scheduled?

Since zombie processes are processes having all resources freed but still existing in process table because their parent might ask for their return status, is it a separate state in Linux like ready, ...
2
votes
2answers
1k views

No TDD For Linux? [duplicate]

I'm a long-time Java developer who's trying to make up his own mind about TDD. I've used JUnit since I first discovered it in 1998. I use it regularly, but I don't subscribe to "write the test first"...
0
votes
0answers
274 views

Is there a cross-platform way to execute a Python3 script fullscreen?

I'm currently developing a small CLI game in Python for practice. While I can set the shell width and height quite easily, there are lots of different screen sizes in use right now, and I would like ...
-3
votes
2answers
2k views

How to use Python to start up multiple programs simultaneously?

I am attempting to write a python script that with remove some of the tedium of my everyday actions. Specifically, I always need to run Eclipse, Java VisualVM, and a docker container. I had planned ...
1
vote
1answer
135 views

Possiblity to request several Linux threads scheduled together (in the same time)

I'd like to be able to request Linux to schedule two or more threads in the same time. I mean today when my multi-threaded program is being executed I know that in worst case only one of my threads is ...
0
votes
0answers
62 views

Update Mechanism for Web-Application embedded on Linux SBC

For one of my current projects (that will later turn into a commercial end product) I was looking for a way to perform updates to the software and I came up with the following solution: Details to ...
0
votes
3answers
200 views

Can I easily parallelize this script?

I have a script that compares in some way each line from file1 and file2, and outputs the lines if there is a difference. I want to make it faster - right now it's in Python. I could use threads, but ...
0
votes
2answers
136 views

Standard for implementing GUIs for command line utilities

I wrote a command-line utility and I want to develop a GUI for it. I saw that almost every tool on linux comes command-line, and it eventually has a GUI which interacts with the command line utility ...
0
votes
1answer
93 views

How to go about a remote shutdown program?

i've been wrapping my head around this and I want some ideas. How would I go about making a remote shutdown program for one computer to shutdown another? Would I use http or another protocol? I was ...
-1
votes
2answers
148 views

How to write code for different versions of linux

So, I've written some fairly big code for cent OS 7.1. The code essentially makes use of different command line tools by parsing the text output and shoving it in a database... pretty straight forward....
1
vote
1answer
112 views

call a non GPL-Program from a GPL program via fork

I downloaded a GPL program, I want to modify this GPL program in order to make it calling a non gpl program (commercial license) via fork+exec. Concerning the input/output data of the non-gpl program:...
5
votes
1answer
618 views

Driving Linux input events from serial device

I'd like to build a RaspberryPi-based device that can communicate with my Linux laptop over USB (don't think it matters, but I'll be using a custom made USB dongle that has an FTDI chip on it, and my ...
0
votes
0answers
473 views

using pthread_cond_broadcast with no mutex or waiting thread?

Assuming some pthread_cond_t condvar; properly initialized with pthread_cond_init am I allowed to pthread_cond_broadcast it without any mutex locked and thread blocked with pthread_cond_timedwait on ...
2
votes
1answer
1k views

Cross compiling Linux containers for embedded devices

I have recently been exposed to Docker and found it to be an excellent tool for making production deployments very less risky that what I was used to (coming from an embedded world, embedded as "Linux ...
2
votes
3answers
933 views

Do I have to fork a server program as an “C” child process in order for correct interprocess communication to take place?

I would like to implement interprocess communication between an Ubuntu Linux 15.10 mono 4.1.2 C# recorder client and Ubuntu Linux 15.10 mono 4.1.2 C# video server using a C++ mutex class and C++ ...
3
votes
2answers
377 views

Multiple windows

A while back I got into a discussion with a classmate about whether our application should use multiple JFrames, or windows. I'm a linux-user, and said yes. He's a windows-user, and said no. When ...