Questions tagged [unix]
Unix is a multitasking, multi-user computer operating system originally developed in 1969.
58 questions
0
votes
1
answer
187
views
Using sed/awk to bulk generate static HTML pages off of a template
Hypothetically, consider a social photo platform - each pic gets its own url, this page contains the image, text about the image, buttons for the user to click, related pics, and some user-specific ...
4
votes
0
answers
1k
views
Is there a conventional URI scheme for local sockets (AF_UNIX)?
I'm looking at creating a class which accepts a string to define a Unix socket address.
Linux supports three types of addresses for Unix sockets:
File based addresses (also called named domain ...
1
vote
0
answers
94
views
Inter-Process Communication: Stream data from single writer process to multiple reader processes
tl;dr - I want to stream text data from one writer process to multiple reader processes. I'm thinking of using a file to achieve this. Is it a good idea?
Using a file would avoid having to maintain ...
4
votes
0
answers
176
views
Origin of the strftime %c format field order in POSIX locale
In standard POSIX locale strftime(buf, size, "%c", time) will format the date and time in an order that has confused me a number of times because it has month and day precede the time, but ...
0
votes
0
answers
83
views
Design time based job scheduler
Currently, I have a script
install_crontab.py -u <user> -c <config>
This script takes care of installing cron job that runs as a given user. In my install_crontab script, I check (using ...
-1
votes
1
answer
1k
views
Local Path on Linux [closed]
As we all know /usr/local/sbin, /usr/local/bin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games and /snap/bin are directories that Linux commands ( Except ones that built-in to shell and custom ...
-1
votes
2
answers
90
views
commonly used practices for deploying package primarily composed of bash scripts
I am working on a tool that primarily uses bash scripts and C++ code.
Generally I have experience with basic tools written in C and C++ in which we can have a build system like ./configure; make; ...
1
vote
1
answer
168
views
Is it common to include a specific build of a library/ tool for production level project?
I am working with C++ in a Linux/ Unix environment. I am trying to learn the physical design of large scale projects. In one of my projects, I am using an SDK from a camera manufacturer. They released ...
-3
votes
3
answers
772
views
Ken thompson's compiler hack [duplicate]
I have gone through ken thompson's compiler hack paper, can't we just go through the complier's source code and check for any backdoor, what was the article's point?
https://www.archive.ece.cmu.edu/~...
1
vote
2
answers
713
views
Why terminals only allow character-cell displays
In wondering about math fonts in the terminal, I started to realize that you can't really have pixel-perfect graphics in the terminal:
How to draw a single pixel in a terminal?
Terminal with image ...
0
votes
0
answers
101
views
Cycle accuracy through the use of a microtable for an 8 bit CPU emulation?
I'm in the process of writing a 8 bit cpu emulator and currently have a jump table for different opcodes. I want to move this over to be cycle accurate and was wondering what the best approach would ...
50
votes
5
answers
11k
views
Is it a good idea to call shell commands from within C?
There's a unix shell command (udevadm info -q path -n /dev/ttyUSB2) that I want to call from a C program. With probably about a week of struggle, I could re-implement it myself, but I don't want to ...
2
votes
2
answers
694
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 ...
6
votes
1
answer
900
views
Why does the C stdio 'ungetc' function exist?
In the C programming language (and many subsequent languages that either directly interfaced with or built a facsimile of the C's Standard IO functions), there exists a function called ungetc: int ...
1
vote
1
answer
99
views
What criteria should I use for determining whether or not to terminate a daemon (to restart it later)?
Should a daemon, forked from a CGI script (whenever the CGI script is called and the daemon is not yet running), hang running (most of the time just waiting for a connection) all time, or should it be ...