1. J

    C How to use kevent; confused by manpage

    I recently got into using kevent. Reading the manpage (as of FreeBSD 14.0), I'm left with a lot of questions and I didn't find better documentation yet. In particular, the following questions remain unclear to me: What is the purpose of EV_ENABLE and EV_DISABLE (in contrast to deleting an...
  2. Ishayahu

    Solved Creating service: problem with pid & output redirection

    I created a service: #!/bin/sh # PROVIDE: reklama # REQUIRE: DAEMON # KEYWORD: shutdown . /etc/rc.subr name="reklama" rcvar=reklama_enable start_cmd="${name}_start" pidfile="/var/run/${name}.pid" reklama_start() { /usr/local/bin/mpg123 -a /dev/dsp4.0 --loop -1...
  3. E

    could not get PID in a script

    Hi All, In my script, I am trying to get the PID ID of the following process: 30679 0 SJ 0:01.47 node: homebridge (node). I have tried pidof, pgrep and ps but I can't find a way to get the correct PID. there are multiple node processes, when i use pidof node i get more than 1 pid. Does...
  4. Samuel Venable

    Solved Odd Segfault, Very Specific and Obscure Steps to Reproduce

    I was wondering if anyone could look at my code and be able to help identify what I'm doing wrong? It gets the current working directory of a given process id using libprocstat. I normally does work and can get the cwd of a pid just fine, but that's assmuing I don't do the specific thing in my...
  5. R

    Can't run nginx automatically as user

    I have an nginx server configured to run the master service as a non-root user and it runs fine when I manually invoke it by running nginx -c /path/to/nginx.conf as the user 'nginx' but it doesn't work from my rc.conf script. I've tried to automate startup by writing it into an rc.conf script...
  6. manas

    Collect statistics on bandwidth used by a PID

    Hello, I did a simple search for this and did not see an answer: Is there a simple way to monitor the instantaneous bandwidth usage of a process (or a process tree) based on PID? Thanks