Questions tagged [freebsd]

This tag should be used for question pertaining specifically to the FreeBSD operating system. In keeping with the intent of Stack Overflow, this is limited to programming, not such things as use, installation, configuration, or maintenance.

Such questions generally belong on Super User if related to personal/workstation use, or on Server Fault if related to use as a server.

See Also

2006 questions
21
votes
2 answers

Run as different user under FreeBSD

Is there a way in FreeBSD to (being root) run a command as unprivileged user, like nobody? Kind of like reverse of sudo. Oh and considering that 'nobody' has /usr/sbin/nologin as shell - so su is not an option.
Slava V
  • 16,686
  • 14
  • 60
  • 63
21
votes
4 answers

PostgreSQL In Memory Database

I want to run my PostgreSQL database server from memory. The reason is that on my new server, I have 24 GB of memory, and hardly any of it is used. I know I can run this command to make a ramdisk: mdmfs -s 1024m md2 /mnt And I could theoretically…
David Barnes
  • 2,138
  • 5
  • 19
  • 25
21
votes
6 answers

Rails: Command not Found after successful install

So I installed ruby, gems and rails - however whenever I type rails I get the rails: Command not found. error. I did a dump of my local gems, which I'll include below *** LOCAL GEMS *** actionmailer (3.2.7) actionpack (3.2.7) activemodel…
Drazion
  • 342
  • 1
  • 4
  • 12
20
votes
2 answers

Bash script execution with and without shebang in Linux and BSD

How and who determines what executes when a Bash-like script is executed as a binary without a shebang? I guess that running a normal script with shebang is handled with binfmt_script Linux module, which checks a shebang, parses command line and…
GreyCat
  • 16,622
  • 18
  • 74
  • 112
19
votes
5 answers

What does the GDB backtrace message "0x0000000000000000 in ?? ()" mean?

What does it mean when it gives a backtrace with the following output? #0 0x00000008009c991c in pthread_testcancel () from /lib/libpthread.so.2 #1 0x00000008009b8120 in sigaction () from /lib/libpthread.so.2 #2 0x00000008009c211a in…
Shane Breatnach
  • 934
  • 2
  • 8
  • 14
18
votes
3 answers

mktime and tm_isdst

I saw a lot of different views so thought of asking here. I read man mktime: (A positive or zero value for tm_isdst causes mktime() to presume initially that summer time (for example, Daylight Saving Time) is or is not in effect for the specified…
hari
  • 9,439
  • 27
  • 76
  • 110
18
votes
1 answer

What's the difference between a Linux chroot jail and a FreeBSD jail?

What's the difference between a Linux chroot jail and a FreeBSD jail? Are they synonyms in modern systems? Is one more secure than the other? Is one more flexible?
Nektarios
  • 10,173
  • 8
  • 63
  • 93
17
votes
3 answers

How do I create a soft link programmatically in C/C++?

How do I create a soft link programmatically in C/C++? link() system call in freebsd will create a hard link.
Professor_Chaos
  • 323
  • 1
  • 2
  • 6
16
votes
4 answers

How to make my python script easy portable? or how to compile into binary with all module dependencies?

Is there any way to compile python script into binary? I have one file python script which uses a lot of modules. What I would like is to have its copy on other machines (freebsd) but without installing all needed modules on every host. What are…
andriyko
  • 277
  • 1
  • 4
  • 12
16
votes
2 answers

Anonymous mmap zero-filled?

In Linux, the mmap(2) man page explains that an anonymous mapping . . . is not backed by any file; its contents are initialized to zero. The FreeBSD mmap(2) man page does not make a similar guarantee about zero-filling, though it does promise that…
jbapple
  • 3,297
  • 1
  • 24
  • 38
16
votes
4 answers

Finding process with heavy disk I/O on FreeBSD

I wonder how I can monitor which process takes out all my I/O bandwith. The only command I know is gstat but it shows cumulative info. Are there any tools I can use to inspect the running processes for their I/O usage? The system is FreeBSD 8.3.
Sergey Efimov
  • 473
  • 1
  • 3
  • 16
15
votes
7 answers

how to use quad core CPU in application

For using all the cores of a quad core processor what do I need to change in my code is it about adding support of multi threading or is it which is taken care by OS itself. I am having FreeBSD and language I am using is C++. I want to give complete…
Mayank
  • 151
  • 1
  • 1
  • 3
14
votes
3 answers

Displaying each assembly instruction executed in gdb

I currently have a tricky bug that occurs in a place where I don't have access to source or symbols, i.e. I can see the instruction and its address where the crash occurs, but that's about it. What I'd like to do is have gdb run without requiring…
Dan Fego
  • 13,644
  • 6
  • 48
  • 59
14
votes
2 answers

WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 64 error using Selenium Geckodriver Firefox in FreeBSD jail

For some tests, I've set up a plain new TrueNAS 12.3 FreeBSD Jail and started it, then installed python3, firefox, geckodriver and pip using the following commands: pkg install python3 firefox geckodriver py38-pip pip install --upgrade pip setenv…
Kurtibert
  • 638
  • 1
  • 5
  • 16
14
votes
1 answer

sctp_connectx() gives EINVAL on FreeBSD

#include #include #include #include #include #include int main(int argc,char **argv) { struct sockaddr_in remoteAddr; int clientSock =…
binary01
  • 1,728
  • 2
  • 13
  • 27