BSD is a family of Unix-like operating systems, including FreeBSD, NetBSD and OpenBSD.
Questions tagged [bsd]
510 questions
0
votes
1 answer
Get BSD file descriptor from OSX CoreServices objects
I am new to OSX user space development. I've read documentation and googled before asking, but still have no clue about the following.
If i am to use CoreServices framework to work with files (FSRef, Forks, URLs, etc.) will i be able to get a raw…

Inso Reiges
- 1,889
- 3
- 17
- 30
0
votes
1 answer
insert new line with leading whitespace using sed on osx
I have a yaml file that looks like this:
:stuff:
- text
What I need in the end is this:
:stuff:
- text
- moretext
Because it's yaml it's whitespace sensitive. I've been trying to use sed to add a new line with leading whitespace and can do…

philbert
- 478
- 4
- 15
0
votes
1 answer
Software configuration files, where should I put them in Linux systems?
I'm managing this open source project PM2 and I have a decision to take about where to put all configuration files.
Currently I store all these files under $HOME/.pm2/, but some user permissions can mess up with that logic.
What is the folder that…

Unitech
- 5,781
- 5
- 40
- 47
0
votes
1 answer
BSD Kernel parameter indicating shared memory in use
Following are BSD OS based shared memory ipc kernel parameters.
shmall: Maximum total size of shared memory in pages (normally 4096 bytes)
shmmax: Maximum size of shared memory segment in bytes
shmmin: min shared memory segment size
shmmni: max…

Ram
- 1,153
- 4
- 16
- 34
0
votes
2 answers
Error while setting up netbsd crosscompiler
I am in the process of setting up a cross compiler for netbsd to sbmips with a mips64el processor.
so I got the source and used ./build.sh -a mips64el -m sbmips and I got my toolchain with no errors.
I continued to configure the kernel with:
cd…
user2882307
0
votes
1 answer
Copying data in the kernel
I want to copy a string into a local buffer using copystr() but have been having problems doing so. The string I want to copy is uap->path from the VFS function sys_chdir in /usr/src/sys/kern/vfs_syscalls.c. Here is one of the things I've…

user3606204
- 3
- 1
0
votes
1 answer
Restrict symbolic link deletion
/etc/test.conf is a symbolic link to /var/etc/test.conf.
/var/etc/test.conf file has flags sunlnk and schg, meaning file can not be removed/moved and no modifications allowed (read-only).
Without changing file flags:
I can NOT delete…

Ram
- 1,153
- 4
- 16
- 34
0
votes
0 answers
PHP *_autoload File Inclusion
When you autoload classes with either __autoload or spl_autoload_register do you have to sanitize the data if the variable used to initialize the class is dynamically initialized using…

KaekeaSchmear
- 1,548
- 5
- 18
- 30
0
votes
1 answer
Linux equivalent of FreeBSD's cpu_set_syscall_retval()
The title pretty much says it all. Looking for the Linux equivalent of cpu_set_syscall_retval() found in /usr/src/sys/amd64/amd64/vm_machdep.c. Not sure if there is even such a thing in Linux but I thought I'd ask anyway.
…
0
votes
2 answers
Why would someone set a shell variable with `which` before invoking utility?
I used to work with another, more experienced programmer who would put almost ALL of the utility calls within a shell script in the following manner:
FOO=`which foo`
$FOO -bar
After working with the guy for over a year, I knew pretty well that he…

Mange
- 5
- 2
0
votes
1 answer
Garbage uint64 values from ctypes
I'm trying to read the fields ifi_ibytes/ifi_obytes from the struct if_data64 as described in this header file. I've got ctypes working and I can make the sysctl call and I'm getting what seems to be usable information out of it. However, I'm…

ldrg
- 4,150
- 4
- 43
- 52
0
votes
1 answer
In freebsd, how to know what options were enabled in kernel during Compiling
After compilation, if one wants to know the different options which were enabled during compilation, how can one find out?

Saynb
- 55
- 8
0
votes
0 answers
Objdump: Retrieve flags
I'm actually studying the unix objdump command.
I want to retrieve the flags showed by the command "objdump -f file"
Here is an example
$>objdump -f /bin/ls
/bin/ls: file format elf64-x86-64 architecture: i386:x86-64, flags 0x00000112:
EXEC_P,…

Thomas Chafiol
- 2,395
- 1
- 13
- 16
0
votes
3 answers
Reading all available bytes via socket using blocking I/O
When reading from a socket using read(2) and blocking I/O, when do I know that the other side (the client) has no more data to send? (by "no more data to send" I mean that, as an example, the client is waiting for a response). At first, I thought…

watain
- 4,838
- 4
- 34
- 35
0
votes
1 answer
How to examine problems with the blocked call to write() on Linux/FreeBSD?
I have an active running process on Linux/FreeBSD. I have traced it, and found that one of the threads is blocked on the call to the function write() - as an argument it has a TCP socket. It's may be hanging for hours.
What are the ways to examine…

abyss.7
- 13,882
- 11
- 56
- 100