Questions tagged [bsd]
BSD is a family of Unix-like operating systems, including FreeBSD, NetBSD and OpenBSD.
519
questions
1
vote
0
answers
34
views
Preprocessors in the BSD and GNU make build systems
Microsoft's nmake build system has a wonderful thing called a preprocessor.
For example, if I write the following in my make file
!IFDEF SOMEMACRO
target1 : dependent1
command1
terget2 : ...
0
votes
2
answers
56
views
Question to multicast concept with BSD Socket APIs
I'm relatively new to topics such as socket programming and multicast messages. I'm trying to understand this concept better.
Let's say a PC is sending Multicast messages over address 224.0.0.0 on ...
1
vote
1
answer
51
views
How to handle debug and release compiler flags in BSD make
Using BSD make, I wish to use different compiler flags for the debug and release versions of my program. The version of the program to build should be defined via a MODE variable. I would like to only ...
1
vote
1
answer
154
views
Are There Always-Used and Kernel-Specific System Call For BSDs and Linux?
I am currently working on a project depends on detecting which OS the executable belong to.
I am only working on ELF executable format so I tried to use e_ident[EI_OSABI] value but doesn't give ...
1
vote
0
answers
68
views
GNU sed to BSD sed for bash goto function
I make extensive use of a bash goto function that works through a GNU sed command. However, the sed command is not compatible with BSD sed. How would I need to change it to function correctly in an ...
1
vote
1
answer
62
views
Is It bad for performance if a bunch of threads are in a blocking state?
Does the Linux or BSD kernel slow down if a program has a bunch of threads in a blocking io state, or is the performance deficit so negligible that it can be ignored. I am writing a server program ...
2
votes
1
answer
146
views
How to test for BSD on GitHub actions?
I'm working on a project that needs to work on both Linux/BSD and every once in a while a change is made that causes a regression for BSD.
How can I test BSD on GitHub actions?
2
votes
1
answer
293
views
If I have a file descriptor with an integer value above 1024, can select() still work on it?
The man page for select() states:
WARNING: select() can monitor only file descriptors numbers that are less than FD_SETSIZE (1024)—an unreasonably low limit for many modern applications.
This is ...
0
votes
0
answers
29
views
How can I enable Uniflex BSD sockets to be BROADCAST?
I am restoring a Tektronix 4404 running Uniflex from 1986. The BSD socket implementation is done by Network Research Corporation; there are no docs. I have header files but there are no function ...
2
votes
0
answers
493
views
Django project ModuleNotFoundError: No module named '_sqlite3'
OS bsd 13.2 on dedicated rental server
csh terminal
python3.9.17 system and venv
Django 4.2.2
wanting to learn django, I set up a venv and installed django there.
all good but at (django) pyweb@os3-...
1
vote
0
answers
39
views
STDIN dup2 for OpenBSD/NetBSD
I have a child using dup2:
case OPGAME:
users[userid]->userNextEntry = redirectuser( userid, 0, USERMODULES[MENU] );
pid = fork();
if ( pid == -1 )
parseerror( SYSTEMERROR )...
2
votes
2
answers
150
views
How to get a user name of the interactive login session that a process is running in?
From my macOS GUI app (written in Swift and C) how do I find out the interactive user name for the login session where my process is running?
I know that I can use getuid() and geteiud() to get the ...
2
votes
1
answer
278
views
pthread_mutex_lock and an abandoned shared mutex
Pardon me if I'm asking the obvious. I come from years of programming under Windows.
Currently I'm working on a project that is running under macOS. (And I believe it uses Free BSD under the hood.)
So ...
0
votes
1
answer
75
views
statfs on macOS doesn't give me full disk capacity. Why?
I'm trying to get the storage drive capacity and the free space on it from my macOS app.
I do the following:
struct statfs stStg;
if(statfs(".", &stStg) == 0)
{
uint64_t total_sz = ...
0
votes
1
answer
68
views
What is the required lifetime of struct kevent passed into kevent changelist?
The signature of the kevent system call for OSX and BSD is as follows:
int
kevent(int kq, const struct kevent *changelist, int nchanges, struct kevent *eventlist,
int nevents, const ...