You can install the pstree
command using either Homebrew (my personal favourite), MacPorts or Fink and you'll get a command-line, tree view of processes on your Mac.
With Homebrew installed, just run:
brew install pstree
then use it like pstree
from the command line.
Details:
I have formated a 2TB external disk with UDF filesystem in Ubuntu. The way I formatted it was:
sudo mkudffs --media-type=hd --vid=myDisk --blocksize=2048 /dev/sdc
This UDF partition on your external disk would not be readable by any non-Linux system. Requirement of UDF filesystem is that disk's logical block size must match UDF filesystem block size.
All hard disks and SSD, including external disks have logical block size of 512 bytes. Note that new disks have physical block size of 4096 bytes, but here is relevant just logical. CD/DVD/BD optical discs have logical block size of 2048 bytes, so you probably thought that settings for optical discs would work also for hard disks...
So first problem is that it doesn't recognize the TYPE NAME is defined in format option (--vid=myDisk).
Volume label for UDF filesystem is defined by Logical Volume Identifier which is configured by --lvid option in mkudffs.
What you need is to re-format your disk again with correct --blocksize and ideally specify also --lvid for label.
New version 2.0 of mkudffs now automatically set --blocksize to the logical block size. And it also supports option --label which sets correct parameters for volume label.
For more information about compatibility of UDF, mkudffs and other operating systems looks into mkudffs 2.0+ manpage into section COMPATIBILITY and BLOCK SIZE.
Summary:
To format hard disk correctly with mkudffs prior to 1.1 you should do:
sudo dd if=/dev/zero of=/dev/sdc bs=1M count=10
sudo mkudffs --blocksize=512 --lvid="label" --vid="label" /dev/sdc
With mkudffs version 1.1+ you should just do:
sudo mkudffs --label="label" /dev/sdc
If you want your hard disk to be readable also by Windows systems then you need to use at least mkudffs version 2.0.
Best Answer
/private/var/run
is the place for system/root level pid files to live on OSX (Darwin)Locking is more complicated (or simple depending on your POV) with the system/API arbitrating device locks rather than writing them to the filesystem.
Do consider the implications of fast user switching and the documentation on Multiple User Environments or simply calling
NSTemporaryDirectory
if your locking happens in user space or the application can be fired up more than one at a time.