Hot answers tagged

28 votes
Accepted

What are the reasons for why a Java/Linux stack fails to be "real time"?

A software is real time not when it is as fast as possible, but when it is guaranteed that a process completes within some determined time slot. In a soft real time system, it is good but not ...
amon's user avatar
  • 134k
15 votes
Accepted

Why does linux require that newly added syscalls be supported permanently?

This doesn't really have anything particular to do with Linux or with syscalls. This is true for any interface that wants to be backwards-compatible: once you add something, you can never take it out ...
Jörg W Mittag's user avatar
14 votes

JSON without quotes for keys

Keys in a JSON dictionary are not quoted strings, they are strings. Strings in JSON start with a quote, continue with escaped or unescaped characters, and end with a string. You can’t have different ...
gnasher729's user avatar
  • 44.6k
14 votes

JSON without quotes for keys

It sounds like you are looking for a data-serialization format that is human-readable and version-control-friendly but not as strict about quotes as JSON. Such formats include: Relaxed JSON (RJSON) (...
David Cary's user avatar
  • 1,432
11 votes

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

What is the technical term for the "-m" ? The "technical term" for command line options is command line options1. There general usage is to specify parameters for the program, either of boolean (flag/...
πάντα ῥεῖ's user avatar
10 votes

Is it true that calling _exit() instead of exit() won't prevent static destructors from being called?

Right, the C++ standard says what exit() does, but it doesn't say what _exit() or _Exit() do. From n3290 which, if I'm not mistaken, is the C++11 standard excepted minor last minute editorial ...
AProgrammer's user avatar
  • 10.5k
10 votes

Is an OS kernel a singleton?

No. A Singleton is pattern for object oriented programming. Most operating systems are not designed that way. In fact, very few operating systems use object oriented programming at all within the ...
Berin Loritsch's user avatar
9 votes
Accepted

How does one person handle all?

Does it mean that he checks every patch? No, it doesn't mean that. It means that if it comes to it, he can reject or accept any patch and cannot be overruled. Which doesn't mean he looks at every ...
Oded's user avatar
  • 53.5k
8 votes

What paradigm to use when determining shell script vs a "proper" programming language?

Shell scripts are good for a sequence of shell commands. While Bash has a couple of more advanced features, anything that goes beyond passing strings to commands is a lot of pain. In particular, these ...
amon's user avatar
  • 134k
8 votes
Accepted

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

Static linking glibc is a no-no. My understanding is that is often customized for the distro, so you don't want to be distributing that to machines running different linux distros/releases. There ...
GrandmasterB's user avatar
  • 39.2k
7 votes

Can we use the term "driver" for a software layer that doesn't access a physical device?

Yes. A driver is basically a system/kernel level piece of software responsible for abstracting away hardware, regardless of where in the pile of abstraction layers it is. Many drivers don't ...
whatsisname's user avatar
  • 27.7k
6 votes
Accepted

Standard for implementing GUIs for command line utilities

What's most favorably looked upon I think is to actually write SweetApp and libsweetapp together, with the SweetApp commandline application a full-featured but minimalist CLI wrapper around the ...
whatsisname's user avatar
  • 27.7k
6 votes

can two web browser tabs be distinguished in a single-page application?

Session storage is tab specific (i.e. not shared across tabs). So you can check session storage for a given key value, create it if it doesn't exist, and include it in any requests you send to your ...
Jeff Lambert's user avatar
6 votes
Accepted

Is it secured to accept and execute user provided CURL commands

There are a lot of things that can go wrong here, security-wise. Insufficient shell escaping could lead to arbitrary code execution on your server. Vulnerabilities in curl could lead to arbitrary ...
amon's user avatar
  • 134k
6 votes

Shell Script Design Patteren: Source a library file VS Call different files?

First piece of advice is to echo Stefano Borini: "don't." Some languages offer good support for core software engineering concepts without the need of supporting 1970's sh syntax. Prefer ...
J_H's user avatar
  • 6,475
5 votes

Low level Linux graphics

A good tutorial for low-level graphics on Linux is available here. A good post on stack overflow for low-level input is available here. Regardless, you probably want to use framebuffer or drm/kms (...
Vreality's user avatar
  • 159
5 votes

Difference between '\n' and '\r\n'

Here is an answer from the best source - Microsoft. Why is the line terminator CR+LF? This protocol dates back to the days of teletypewriters. CR stands for "carriage return" - the CR ...
Ondra Žižka's user avatar
5 votes
Accepted

Ken Tompson Hack

he hacked /bin/login to introduce a backdoor. he did this by hacking the compiler to introduce the backdoor into a binary whenever it detected that it was compiling the login source code. he also ...
Jörg W Mittag's user avatar
5 votes

Developing for a wide variety of Linux Desktops

Of course you're missing some possibilities - the curse and blessing of open-source software is that anyone can create their own alternative, and many do - but you've listed the most important ...
Kilian Foth's user avatar
5 votes

Which registers should executable loader install before start a program?

This functionality you ascribe to the loader is usually called crt0 or crt0.o. It usually has an entry point called __start, that the operating system will transfer initial control to. It is part of ...
Erik Eidt's user avatar
  • 33.7k
5 votes
Accepted

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

Very roughly: A Linux system speaks UNIX. It gives you the ability to run UNIX programs by offering the syscalls open(), malloc(), socket() etc. etc. A web server like nginx speaks HTTP - it ...
Kilian Foth's user avatar
5 votes
Accepted

Is there such a thing as linking to too many dynamic libraries in Linux?

For something like this to matter, you would be talking about a process that spawns a lot... Well, in that case, these libraries would be loaded to begin with. If it is something that only lives once, ...
Lacey's user avatar
  • 161
5 votes
Accepted

Is it common to include a specific build of a library/ tool for production level project?

Is it common to include a specific build of a library/ tool for production level project? I would say it is at least not totally uncommon, and it depends on how you define "production level". But if ...
Doc Brown's user avatar
  • 206k
4 votes

What are the reasons for why a Java/Linux stack fails to be "real time"?

From wikipedia: A key characteristic of an RTOS is the level of its consistency concerning the amount of time it takes to accept and complete an application's task; the variability is jitter. The ...
Lawrence's user avatar
  • 637
4 votes

Is it true that calling _exit() instead of exit() won't prevent static destructors from being called?

On Linux, _exit(2) is a system call (often exit_group(2) is actually called). So if you call that raw syscall nothing else happens except that the current process is ending and _exit terminates ...
Basile Starynkevitch's user avatar
4 votes
Accepted

Multiple windows

Background While several windows for one application is perfectly possible in Windows (see GIMP implementation), it is not commonly used. One of the reason may be related to technical background. ...
Christophe's user avatar
  • 76.6k
4 votes

How do you manage your OpenCL source?

You could also embed the OpenCL source inside your executable. Just make a tiny script converting (perhaps with the help of hexdump(1)...) that file into a huge C file like const char myopenclsource[...
Basile Starynkevitch's user avatar
4 votes

Best way to signal all child processes to terminate using C

I recommend you to store the child process PID in an array, to eventually, send the signal in this way. for(i=0; i<number_of_child; i++){ if(kill(PID_child[i], SIGTERM) == -1 &&...
Sir Skizo's user avatar
4 votes

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

The world of source code is so large that "most" is a hopelessly vague qualifier. Programs written in "scripting" languages like Ruby, Perl, or Python, usually run on both OS X and Linux with no or ...
Charles E. Grant's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible