Questions tagged [bsd]

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

510 questions
0
votes
2 answers

What is the fastest NoSQL database that meets these requirements?

I want a fastest nosql database with following requirement It must be licensed under Apache or BSD or other but must not GPL It must support java It should work in embedded mode Should provide High Performance Search (for char search within…
JOHN
  • 587
  • 1
  • 5
  • 9
0
votes
1 answer

Sends from epoch, for 1 year ago on MacOS / BSD?

I'm trying to calculate the number of seconds since the Epoch, using date on MacOS BSD. I can get a one year ago date string: $ date -v -1y Tue Apr 21 10:44:47 EST 2020 ...but I can't figure out how to convert it into seconds since Epoch. Any…
qUEnbcAr
  • 51
  • 6
0
votes
2 answers

how to determine if a file is completely downloaded using kqueue?

I want to implement a function which monitor a directory and perform some action when a new file is downloaded from the Internet, but found it difficult to determine if the file is completely downloaded, is there a way to do that?
SolskGaer
  • 71
  • 7
0
votes
1 answer

How do I add +1 to epoch time using Bash in Mac OS X?

I'd like to add +1 to the epoch time conversion. Right now it outputs 1615715999 & 1 separately, but I'd like for the output to be 1615716000 which is epoch time + 1. This is on Mac OSX using BASH, any suggestions? Truly appreciate it!!! epoch_s=…
Geo408
  • 1
0
votes
1 answer

Erratic timeout when using TCP sockets locally on macOS

I'm getting an occasional timeout error (ETIMEDOUT) when connecting to another program on the same machine (127.0.0.1). The relevant code is the following: do { fl=connect(mysocket, addr, len); if (fl != 0) …
0
votes
1 answer

Steps to use npm package (react-transition-group) under bsd-3-clause

I'd like to use the "React Transition Group" package from npm which is under the bsd-3-clause license. If I read correctly I am free to use it in my web-app, but I don't understand if I have to write something in my LICENSE file. In the BSD text it…
Lolukok
  • 54
  • 8
0
votes
1 answer

Boost::asio to Struct (like recv)

i wanted to ask, if there is a possibility to receive from boost::asio::ip::udp::socket the data directly into a struct like in standard BSD Sockets: struct T; size = recv(sock,&T,sizeof(T)); Since i receive a lot of fixed size data,, i…
0
votes
2 answers

Trouble compiling ncurses-st-menu for BSD

I found a package on github (https://github.com/okbob/ncurses-st-menu) and am having trouble compile it for BSD platforms like NetBSD or OpenBSD. The instructions say to do ./autogen.sh, ./configure, and then make. So I install the autoconf,…
0
votes
0 answers

OSX assembly questions

I have written x32 hello world on osx. section .data ; .data section declaration hello_text db "Hello, World!",10 ; declared "Hello, World!\n" as bytes hello_length equ $ -…
Jbwz
  • 185
  • 15
0
votes
1 answer

"the manual entries in section 4" in macOS manual?

man 2 bind on macOS Terminal contains this comment. ... The rules used in address binding vary between communication domains. Consult the manual entries in section 4 for detailed information. What's the "the manual entries in section 4" and how to…
eonil
  • 83,476
  • 81
  • 317
  • 516
0
votes
2 answers

Using Grep to pull lines while omitting repetitive string

My input file is cat random.txt hello my name is hello When I use egrep '^hello|hello$ random.txt results are hello my name is hello How would I modify the command to instead output something like this hello my name is or my name is…
0
votes
1 answer

How mach trap become syscall?

I'm new to XNU kernel and partially confused. I see that we a function in file vm_unix.c: kern_return_t task_for_pid(struct task_for_pid_args *args) with the comment: // This should be a BSD system call, not a Mach trap!!! then 2 declarations in…
park joh
  • 23
  • 3
0
votes
1 answer

When should I call res_init in linux?

Pouring over some old network utility code, I found a res_init() call before a getipnodebyname(): void getAddresses(string hostname, set &addresses) { int error = 0; res_init(); struct hostent *host =…
chub500
  • 712
  • 6
  • 18
0
votes
1 answer

DragonflyBSD: possible race-condition in lock manager (kern_lock.c) code?

Lately I've been reading the lock_manager (kern_lock.c) code, and bumped into some scenario which I think would create a race-condition. Step 1: @undo_shreq(...): if there is an upgrade request pending, the code will reset "LKC_UPREQ" flag and do…
RaGa__M
  • 2,550
  • 1
  • 23
  • 44
0
votes
1 answer

CAP_NET_ADMIN equivalent for *BSD

I'm contributing to a routing daemon, and investigating security measures. The daemon, when running, talks to the kernel and installs routes. On Linux, as a good practice, if the daemon is launched as root (and properly configured) it will quickly…
Antonin Décimo
  • 499
  • 3
  • 17