Skip to main content

Questions tagged [bsd]

BSD is a family of Unix-like operating systems, including FreeBSD, NetBSD and OpenBSD.

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 : ...
Restorer's user avatar
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 ...
JohnDoe's user avatar
  • 915
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 ...
Arthur's user avatar
  • 11
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 ...
ChemistryIsTheBest's user avatar
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 ...
parricc's user avatar
  • 89
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 ...
Troy Hamilton's user avatar
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?
jpr42's user avatar
  • 1,492
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 ...
Troy Hamilton's user avatar
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 ...
Elektraglide's user avatar
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-...
lost in japan's user avatar
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 )...
Giorgos Saridakis's user avatar
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 ...
c00000fd's user avatar
  • 21.8k
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 ...
c00000fd's user avatar
  • 21.8k
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 = ...
c00000fd's user avatar
  • 21.8k
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 ...
merlin2011's user avatar

15 30 50 per page
1
2 3 4 5
35