Skip to main content
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
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,472
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 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.6k
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.4k
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
  • 135k
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
  • 7,600
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

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

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
  • 34.2k
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
  • 210k
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
4 votes

Is an OS kernel a singleton?

The singleton design pattern ensures that there is only one single object instance of a class. So unless you develop a kernel class with an object oriented programming language, it is not a singleton....
Christophe's user avatar
  • 78.7k
4 votes

In C++ and GCC on Linux, is it possible to allocate memory to your swap space instead of your RAM?

This is pretty simple (at least conceptually), all that you need is mmap() a file and then just write your own malloc() or override the new operator so that they allocate memory from the mmap-ed ...
Lie Ryan's user avatar
  • 12.4k
4 votes
Accepted

If you're building an algorithm from the C stdlib in pure Assembly (with no help), what is the best workflow for debugging/iterating?

how did they debug this stuff Same as today. You divide the code into trusted and untrusted and pick apart the untrusted until you trust it. How did others in the past do this when the tooling ...
candied_orange's user avatar
4 votes

What does the inode point to in case of a device file other than the disk?

Of course this depends on the file system, but in traditional UNIX filesystems a device node contains a type indicator (block or character device) and a major and minor number. In the kernel, the ...
Hans-Martin Mosner's user avatar
4 votes

Is there a way to use git with multiple users on a shared computer?

Search for "git bare repositories". They are made exactly for this purpose. You need a directory that's write-accessible by all users, then you can push into this directory and pull/clone ...
Hans-Martin Mosner's user avatar
4 votes
Accepted

Can the operating system "break up" a memory allocation (Linux)?

If the process asks for 100MB, there has to be a contiguous 100MB free in the address space of the process (virtual memory), but those addresses can be mapped to non-contiguous pages of physical ...
amon's user avatar
  • 135k
4 votes
Accepted

Feasibility of adding drivers to linux kernel

I have question regarding Linux kernel, as far as I understand, to make Linux compatible with different machines and hardware, different device driver is added to the Linux That is correct, but the ...
Bart van Ingen Schenau's user avatar
4 votes

Feasibility of adding drivers to linux kernel

This is not a "philosophy of Linux", it's a fact of life: over time, new hardware is invented, and needs new software to interface with it. This is true of every OS, in proportion to the ...
IMSoP's user avatar
  • 5,877
4 votes

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

The short answer is backwards compatibility. Otherwise, old software would no longer work on a new version, which tends to be a massive setback for companies and developers alike.
Flater's user avatar
  • 52.8k

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