fuser(1) man page mentions the tool is supposed to list processes that
have specified named file(s) open. As there are several types of files
(according to stat(2)) it's not clear which are supported, e.g.

  $ (mkfifo foo.fifo; cat <>foo.fifo) & nc -lU foo.socket &
  $ fuser foo.*
  foo.fifo:
  foo.socket:

  $ procstat -af | awk 'NR == 1 || /foo/'
    PID COMM               FD T V FLAGS    REF  OFFSET PRO NAME
   6672 cat                 0 f - rw------   2       0 -   /home/luser/foo.fifo
  11493 nc                  3 s - rw------   2       0 UDS foo.socket

  $ fstat | awk 'NR == 1 || $2 ~ /cat/ && $4 ~ 0 || $2 ~ /nc/ && $4 ~ 3'
  USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W
  luser     nc         11493    3* local stream fffffe00a980d690
  luser     cat         6672    0 /home/luser   5982 prw-r--r--       0 rw

fuser(1) on BusyBox/Linux does show open FIFOs, not sure about sockets.

--
FreeBSD 9.0-CURRENT r222247M amd64
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to