BSD is a family of Unix-like operating systems, including FreeBSD, NetBSD and OpenBSD.
Questions tagged [bsd]
510 questions
0
votes
2 answers
BSD Virtual Guest
So I am a big fan of VMs, actually got experience enough to switch my development box to a linux distro. At this point I would like to get more experience with BSD and hope to do this with a VM. So the question I have is what configuration is…

Mike
- 1,297
- 2
- 14
- 22
0
votes
1 answer
What is the purpose of a macro argument that seems useless (see code below)
In the head file queue.h of BSD system, there is the following macro
#define TAILQ_ENTRY(type, qual)\
struct {\
qual type *tqe_next; /* next element */\
qual type *qual *tqe_prev; /* address of previous next element */\
}
With above…

John Z. Li
- 1,893
- 2
- 12
- 19
0
votes
0 answers
Socket fails: Address family not supported by protocol family
I'm trying to create a BSD socket with RTEMS 5 in order to implement an UDP communication. I have the following function:
#include
void Network_Initialization(void)
{
int fd;
fd = socket(AF_INET, SOCK_DGRAM, 0);
…

ferdepe
- 510
- 1
- 6
- 21
0
votes
1 answer
multiple MySQL instance on FreeBSD
Dear all Professionals
We have a serious problem to create Mysql Instance on FreeBSD os.
Here is my progress to make an instance:
1- Create new database instance on new destination
mkdir /mysql2/mysql
mkdir /mysql2/mysql/data
mkdir…

Manisa
- 11
- 2
0
votes
1 answer
BSD socket connect + select (client)
There must be something wrong in the below code but I don't seem to be able to use a client connect, non blocking in combination with a select statement. Please ignore the below lack of error handling.
I seem to have two issues
1. select blocks…

Ger Teunis
- 945
- 1
- 14
- 30
0
votes
1 answer
How to get range of dates that are representable/accepted by date(1)/mktime(3)?
On my modern 64bit Mac, the date 1901-12-14 is the earliest accepted by the following command:
date -ju -f "%F" "1901-12-14" "+%s"
I checked the source for the macOS date command here (Apple Open Source) and it is a failed mktime call that gives…

novelistparty
- 394
- 2
- 16
0
votes
2 answers
share directory with different users on a workstation on linux/bsd
I'm setting up a development workstation that used to have only one shared account to have an account for each developer that may be using it.
We commonly switch workstations. I would like to have certain directories "shared" by all users in a…

Brian Takita
- 1,615
- 1
- 15
- 20
0
votes
0 answers
Remove spaces/tabs from end of line?
I am trying to remove any black spaces from the end of lines. I am doing this and I am wondering why it is not working.
sed -i '' 's/\s*$/ endOfLine/g' myFile
I get this
MyLine
endOfLine
MyLine
endOfLine
I expect this
MyLine endOfLine
MyLine…

Chris
- 985
- 2
- 7
- 17
0
votes
1 answer
OpenBSD 6.1 termio.h: No such file or directory
I try to build my code with OpenBSD 6.1 but I get this error message.
sh.h:98:20: error: termio.h: No such file or directory
In file included from edit.c:1:
sh.h:235: error: conflicting types for 'rlim_t'
/usr/include/sys/types.h:145: error:…

Niklas Rosencrantz
- 25,640
- 75
- 229
- 424
0
votes
1 answer
Command with options in GNU env shebang line throws error
It turns out that a tool for evaluating json that has been humming along nicely on my Mac wasn't as cross platform as I thought. Once I installed it on Ubuntu I got this error:
npm install -g pick_json
echo '{ "foo" : { "bar" : 2 } }' | pick_json…

oligofren
- 20,744
- 16
- 93
- 180
0
votes
1 answer
Dynamic patching of executable on BSD/Unix
I'm facing quite a big problem. I need to patch an executable to modify its behaviour. The program is written in C and until now I've been using IDA to edit it, but that way I couldn't for example replace whole functions etc. It seems for me that…

kjagiello
- 8,269
- 2
- 31
- 47
0
votes
2 answers
Is egrep able to output the results of parenthesized subexpressions?
Is egrep able to output the results of parenthesized subexpressions?
I’m using macOS, and when I checked the man page for grep, it mentioned re_format(7). Checking man 7 re_format, I see that it does have support for parenthesized subexpressions and…

Edward Ocampo-Gooding
- 2,782
- 1
- 23
- 29
0
votes
0 answers
How to overwrite struct kinfo_proc?
I am trying to overwrite kinfo_proc structure but it does not allow me to overwrite it.
However, according to this page, I can overwrite this struct.
http://man.openbsd.org/kvm_getprocs.3
I got struct kinfo_proc and then, write a value inside then I…

NoSleep
- 127
- 1
- 10
0
votes
1 answer
Choose BSD or sys5 style when creating file in linux
When I create file in linux default group owner becomes gid of process which creates file. If I add SGID to parent directory file will inherit parent directory owner group. Also I can change fs mount options to behave either like sys5 or like…

Rasul Osmanov
- 133
- 8
0
votes
1 answer
Unable to deal with a seems unnecessary pointer to pointer when i was reading the core code of bsd 4.4
I was reading the tcp/ip illustrated v2 and confused with a series of codes on the book.
struct ifnet{
struct ifnet * if_next;
……
}
here is the background information of the structure which may help you learn more about the problem
void…

WaldenShen
- 3
- 1