BSD is a family of Unix-like operating systems, including FreeBSD, NetBSD and OpenBSD.
Questions tagged [bsd]
510 questions
0
votes
3 answers
Setting the PS column delimiter on OSX (BSD)
Im working on a script that needs to parse the data returned by a ps command. On Redhat/Centos, I know its easy to specify the column delimiter, but with the BSD version of PS, its not so simple.
I know it would be possible to use awk, sed or tr to…

Justin
- 1,959
- 5
- 22
- 40
0
votes
1 answer
nlist function always returns -1
I made exe file (d.out) by compiling another program. And nlist function always returns -1. fopen func returns !=null. If it matters i compile my prog like this
gcc -I/usr/include main.c -L/usr/lib/i386-linux-gnu/pkgconfig -lbsd
#include…

Arseniy Ermilov
- 35
- 1
- 6
0
votes
0 answers
Read UDP/TCP payload with divert socket
I need to intercept/redirect TCP and UDP packets that have its payloads matching some regex patterns and also get original destination address and port.
I can't just redirect TCP and UDP packets to my application by the use of DSTNAT on firewall…

Tiago.SR
- 349
- 4
- 16
0
votes
1 answer
Get parent process information at runtime on iOS application
I'm trying to obtain some process information at runtime on iOS, particularly the parent process name.
While I'm able to obtain the current process name, it seems that I can't to do the same for its parent.
Here is what I'm doing:
static inline bool…

Andrea
- 26,120
- 10
- 85
- 131
0
votes
1 answer
sed: 1: " '/regex/ ...": invalid command code '
I'm trying to write a program to automatically assemble and run sed commands. I'm using the following code snippet to generate commands:
switch command {
case "=", "d":
return fmt.Sprintf("'/%s/ %s'", regex, command)
case "c", "a", "i":
…

user2469321
- 109
- 1
- 8
0
votes
0 answers
How many LOAD segments will be loaded into memory from a Linux (or BSD) kernel? With any flags?
While working on a custom linker script, I accidentally created an ELF executable (statically linked) with a single LOAD segment containing all the the program sections.
According to readelf, the segment flags were RWE.
I thought "WTF!" but I was in…

Giacomo Tesio
- 7,144
- 3
- 31
- 48
0
votes
0 answers
TCP Stack Sending A Mbuf Chain: where is the loop?
I am new to BSD TCP stack code here, but we have an application that converted and uses BSD TCP stack code in the user mode. I am debugging an issue that this application would hold (or not sending data) in a strange situation. I included part of…

user3894299
- 15
- 5
0
votes
1 answer
Darwin: Thread suspend/wakeup
Usage Cases:
Thread A: Please remove me from the active thread pool, Mr. Scheduler.
Thread B: Mr. Scheduler, please add Thread A to the active
thread pool, if he isn't there already
This is a fairly specific, and well-contained problem. Of…
user6582112
0
votes
0 answers
Close network kernel socket
I'm developing a network kernel extension and tried to intercept packets, on DataOut callback returned EJUSTRETURN to swallow desired packets. Now I'm willing to pass out same data but on different socket. To achieve this I used
errno_t errorRet…

Dawood Mujib
- 337
- 4
- 14
0
votes
1 answer
How to use Babel 6 without Regenerator runtime
I've been using Babel 6 in my latest project, and have a simple script that is distributed to our users. However, our legal team won't allow distributing code that includes the Facebook BSD-style license ( read:…

TbWill4321
- 8,626
- 3
- 27
- 25
0
votes
2 answers
url2pkg returns "/opt/pkg/bin/url2pkg must be run from a package directory (.../pkgsrc/category/package)"
I'm on mac, and I'm trying to create a new package for pkgsrc. Every time I run url2pkg I get the message:
/opt/pkg/bin/url2pkg must be run from a package directory (.../pkgsrc/category/package). at /opt/pkg/bin/url2pkg line 517.
where do I need to…

pizza247
- 3,869
- 7
- 33
- 47
0
votes
0 answers
Adding some extra spaces on the stack
I was learning ASM basics on Assembly "hello, world" for OS X when I saw that:
sub esp, 4 ; OS X (and BSD) system calls needs "extra space" on stack
I'm wondering if the space is dedicated to local variables or somehow related to…

eldten
- 3
- 1
0
votes
1 answer
How to make spidev.c work on samsung s5p6818/Android5.1
I'am using a develop board of samsung s5p6818 soc. After choosing "user mode spi""SLSI SPI port0" on menuconfig, and adding these code in plat-s5p6818/drone/device.c,
/*------------------------------------------------------------------------------
…

罗鸣威
- 1
- 1
0
votes
1 answer
pkgin: /usr/pkg does not have enough space for installation (276M required only 274M available)
I try to install gnome-2.26.2nb5 on NetBSD-7.0 but I receive the following message:
computer#pkgin install gnome-2.26.2nb5
pkgin: /usr/pkg does not have enough space for installation (276M required only 274M available)
It's a fresh install of…

Megidd
- 7,089
- 6
- 65
- 142
0
votes
2 answers
Using kqueue for simple async io
How does one actually use kqueue() for doing simple async r/w's?
It's inception seems to be as a replacement for epoll(), and select(), and thus the problem it is trying to solve is scaling to listening on large number of file descriptors for…
user5709700