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

learn more… | top users | synonyms

0
votes
0answers
13 views

Using the readahead syscall in C in the linux environment

I am interested in using the readahead syscall in a c program. Currently I have opened a file for reading with a call to open(). Once I find a character, say the letter 'b', I want to test whether the ...
2
votes
1answer
64 views

Best practices for a daemon that forks and becomes user

I want to write a small daemon in python under Linux that accepts connections and authenticates the user (details for this don't matter) and then forks a child for the connection and becomes the user. ...
-1
votes
0answers
19 views

How can I estimate the server load per user for a streaming application before I launch it? [on hold]

What methods exist for calculating / predicting server load per user before the application is launched publicly? I'm using a node.js back-end on an Amazon EC2 Linux server. I need to calculate ...
0
votes
0answers
49 views

A callback for when data is received?

So, my understanding is that the Kernel could receive TCP at any time, and that generally a C program asks the Kernel synchronously/asynchronously if it has data available. Would it be possible for a ...
1
vote
2answers
309 views

Strategy for creating a websocket relay?

I own a Raspberry Pi and would like to use it as some sort of websocket relay, so that all people who visit a specific webpage would be able to communicate with each other. The key thing about this is ...
-5
votes
0answers
17 views

Ruby on Rails : create web GUI for backup program [on hold]

I'm learning Ruby on Rails these days. Recently I need to create a web application to monitor backup program on Debian Linux, I wonder if it's good idea to create a GUI for it using Ruby on Rails? I ...
1
vote
1answer
85 views

What does using pointer in Linux kernel imply?

So far I was under the perspective that while working in the kernel code, working with memory implies working with long integers and not pointers because dereferencing pointers shouldn't be done in ...
2
votes
1answer
141 views

What is the motivation for casting a pointer into a integer?

I'm doing some changes in the Linux kernel code and have noticed a pointer being cast into integer. Check out buf below (full code): snd_pcm_sframes_t snd_pcm_lib_read(struct snd_pcm_substream ...
-5
votes
0answers
48 views

Making career in C Programming / Linux Embedded or Linux driver development [closed]

Before putting up my question I want to brief about my career background , I have been working in IT industry since 5 years in Unix ( HP-UX) Domain as system administration and have some knowledge of ...
22
votes
5answers
3k views

Why don't Windows/Linux use relational Databases (RDBMS)?

Why don't Windows/Linux use relational databases (RDBMS)? I know they use file systems to store all data but don't you think it is more efficient to use databases like we use in web sites/web apps? ...
1
vote
2answers
200 views

Is Red Star OS released under the GPL? [closed]

According to Wikipedia, Red Star OS is is a North Korean Linux-based operating system Does that mean it's covered by the GPL, or are there exceptions?
0
votes
3answers
86 views

Reading file during write on linux

As I understand, when a file is being written, the process writing to the file obtains an exclusive lock. So other processes cannot access this file for read. With the above knowledge, I'm unable ...
3
votes
2answers
320 views

What UML diagram should be used for modelling permissions/users/files in Linux?

If I am planning a structure for support testing in Linux, a structure that will contain packages, such files as shell and build scripts, app configurations, DBs, sources, tests and jars for to be ...
2
votes
1answer
75 views

Should one use many small configuration files for script or a single large configuration file?

I have a script which starts from cron with regular interval and sources in around 10 variables. Should I keep those 10 variables in one configuration file in file system or is it a better practice to ...
7
votes
1answer
1k views

“Read” a file without using a file pointer

I was asked this question in an interview. I'm somehow supposed to "read" a file into my C program as input without using a file pointer (including "f" functions, e.g. fgets, fscanf etc.). I'm also ...
-5
votes
1answer
84 views

Linux on USB for Python (or other) Programming on the go? [closed]

This is my first question and I didn't see a similar question asked. Sorry if I didn't search hard enough. To the point. I'm learning the Python programming language and I've read Linux plays very ...
-3
votes
3answers
182 views

Why should PHP developer use/learn VI editor? [closed]

Why should PHP developer use/learn VI editor ? I mean there are 10 most amazing editors like PHPStorm, Netbeans which increases developers productivity. Lets just consider PHPStorm. I never got ...
1
vote
1answer
113 views

How come the NSA could release SELinux as GPL when all US Gov work must be Public Domain?

I'm not sure if this is a good question for this site, but it does deal with the things to do with working as programmer. SELinux is a security enhanced version of Linux, and was initially developed ...
0
votes
0answers
23 views

How to package a SDL2-based Linux app?

I've written a small toy application using SDL2. I want to distribute it the most user-friendly way, for Linux. I should make a deb package, but then I should also make packages for other distros, ...
0
votes
1answer
190 views

Are ANSI* Escape Sequences Proper For Coloring Text in Terminal(Linux)?

I just switched back to Linux after a few years of Windows use and am wondering if ANSI Escape Sequences are okay for coloring text. I ask because the way I did it on windows isn't capable of crossing ...
0
votes
3answers
109 views

What is the explication for the difference execution time for the same instruction?

As you know when we run instruction in our code like long a = b; we will not have the same ticks each to be executed. first exeution it take 2ticks; second exeution it take 3ticks; third exeution it ...
2
votes
1answer
56 views

Library OSes vs Unikernels

My understanding of a Hypervisor & Virtual Machines is that the hypervisor is a program (either running on top of a host OS, or running bare metal as the host) that leverages binary-compatible ...
2
votes
2answers
121 views

What are the benefits of a device driver when I can access the I/O registers directly?

I was interested in what modern, C-based, Linux device driver development looked like, and so I took a good gander at this excellent article. I didn't read every single line, but perused the majority ...
0
votes
1answer
52 views

Memory Limit of a Single Program and mmap

If one has a 32 bit machine, a single program cannot address more than 2^32 bytes, or 4 GB. Would making use of mmap() allow one to exceed the 4 GB limit?
4
votes
2answers
529 views

Is bash “finished”? [closed]

Should bash be expected to change in ways that break non-trivial amounts of existing scripts at some point in the (near/<5y) future? How much change has it gone trough in the last ten years ...
0
votes
0answers
88 views

Best way to signal all child processes to terminate using C

I have been assigned the task of designing a simple web server using C in my UNIX & C class. The webserver listens and forks when a successful connection is made so that multiple clients may be ...
1
vote
2answers
191 views

In need of a divide and conquer approach for re-writing small open-source utilities [duplicate]

Preamble (Skip if you don't like to read) I've been learning C/C++ in school for a year now and all the assignments in the book, after reading through the chapters, were not too difficult to ...
28
votes
14answers
6k views

Which features of shell scripting are relevant for PHP/Python development? [closed]

I'm a PHP/Python programmer learning Java and C#(.NET). My main development OS is windows 7 but I've used Linux and I currently dual-boot with Ubuntu. My Linux knowledge however, is pretty limited. I ...
0
votes
1answer
468 views

Reading a character from a file stream in c++ (AKA: Why no C++ standard equivalent of old conio.h)?

This is a question of about design decisions. I find that there are so many different things I work on where reading a _kbhit() is amazingly useful but I can't find (read: there isn't) any ...
-2
votes
3answers
289 views

Programming in Linux (C++) [closed]

So I don't know If this is the right place to ask this. I am new to programming, I am not very in to it (I know classes,arrays,functions..etc(Basic Things)). I was programming with Visual Studio 2013 ...
1
vote
3answers
144 views

Protect memory from a potentially seg faulting function call

How can one safely call a function that might segfault without corrupting the stack or the heap? These SO questions cover using signal handlers and setjmp.h to regain control. Coming back to life ...
1
vote
1answer
84 views

Should a bin directory be full of shell scripts? [closed]

New guy on the team so I figured I'd ask here in public than sound like a complete dweeb and ask elsewhere. Without giving too much or anything away (please ask questions if you want), but should, or ...
0
votes
2answers
81 views

What does “host” mean in “… host driver” and “… host adapter”?

From How Linux Works, by Brian Ward, I saw "SCSI Host Adapter", "SATA Host Driver", "Disk Driver (sd)", "CD/DVD Driver (sr)", "USB Host Driver", and "USB Storage Driver". What does "host" mean in ...
3
votes
2answers
716 views

Where Should I Put Configuration Files?

I'm creating a project that I want to be able to distribute across platforms. I'm writing in Java and AWT which already gives me a pretty large range of devices, but I'm mostly interested in Windows ...
1
vote
2answers
80 views

How does a user program access a device?

In Linux, from http://www.mulix.org/lectures/intro_to_linux_device_drivers/intro_linux_device_drivers.pdf user programs talk with device drivers through device files But if I understand ...
1
vote
0answers
63 views

Is there a standard practice on making a modular Python script?

I wrote a Python script for PIA here: pia-auto-login.py However, I need to make it more modular so that it does the OpenVPN changes from this script. Then I want to create two more packages (at ...
126
votes
19answers
111k views

Is there any reason to use C++ instead of C, Perl, Python, etc.? [closed]

As a Linux (server side) developer, I don't know where and why should I use C++. When I'm going for performance, the first and last choice is C. When "performance" isn't the main issue, programming ...
0
votes
1answer
364 views

Creating a custom GUI. App/DE/WM?

I am starting with this project of mine of writing a custom UI for linux. What would happen is: The computer would boot into this UI which would not be the typical taskbar/icons/startbutton kind of ...
1
vote
4answers
291 views

Application qos involving priority and bandwidth

Our manager wants us to do applicaiton qos which is quite different from the well-known system qos. We have many services of three types, they have priorites, the manager wants to suspend low priority ...
1
vote
2answers
636 views

Why doesn't Android use shared libraries?

In Android if you use a library in your app (such as the Support Library) the code for the library is duplicated on the device for each app that uses it. Why can't android use the linux "shared ...
17
votes
6answers
6k views

Git-friendly spreadsheet format? [closed]

We're trying to move our project documentation process from Google Documents to a set of self-hosted Git repositories. Text documents are Git-friendly enough, since we usually do not need any fancy ...
0
votes
1answer
97 views

What programmable system can provide persistent scheduling? [closed]

I want to write an application that creates scheduled events at specific times. When the delay elapses the event notifies the application. The scheduled events must not be stored in the application's ...
19
votes
7answers
6k views

Is there a technical reason why you can't develop iOS apps on a Linux computer?

I understand why you can't develop OS X apps on a Linux computer, but is there a good technical reason why you can't develop iPhone and iPad apps on Linux? Why isn't it possible to compile iOS source ...
3
votes
0answers
68 views

Evaluating concurrent application design approaches on Linux

Working on relatively low-speed hardware, I need to grab a snapshot of a rapidly changing datastream and then post-process the snapshot data and save it to disk. I need help with designing the ...
1
vote
2answers
124 views

Program Compatibility - OS That Can Run Anything? [closed]

I know that programs that are built on one OS won't work on another, like a Windows program on a Linux distribution, and that there are programs that translate those system calls into system calls ...
9
votes
5answers
5k views

What advantages does Linux give me when developing in PHP for the web? [closed]

I'm about to begin a big PHP project with a friend. It's my first time using PHP and I've been wondering wether I should try developing on Linux since it's so popular. I've had some past experience ...
28
votes
8answers
5k views

Why don't developers make installation wizards on linux? [closed]

I'm sure it's not about laziness or anything like that but I fail to understand why developers of even mainly consumer facing apps don't make any sort of installation wizard where you go ...
1
vote
2answers
596 views

Infinite while loop CPU usage

I'm coding an script in C, which is going to check constantly an array of events, the idea is to check if the Date and time of certain event is equal to de current time and trigger something, i'm ...
1
vote
2answers
1k views

Creating a websocket server on Linux

I want to create a websocket server and I've found a great article here. However C# will output an exe file. I'd like to have it run on a linux box. What I want to do is to connect to the server, and ...
1
vote
2answers
292 views

Is creating and writing to one large file faster than creating and writing to many smaller files in Python on Linux?

If using Python on a Linux machine, which of the following would be faster? Why? Creating a file at the very beginning of the program, writing very large amounts of data (text), closing it, then ...