lpkruger / posixshmcontrol-macport

Simple Mac port of FreeBSD's https://github.com/freebsd/freebsd/tree/master/usr.bin/posixshmcontrol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quick and dirty port to Mac of the posixshmcontrol utility

What works:

  • create, truncate, stat, and unlink

Problems:

  • The ls subcommand doesn't work and can't work because the Mac kernel doesn't support it.
  • The same kernel source code also shows that reading and writing won't work. The only thing you can is mmap it into the address space. As a TODO this utility could be modified to support reading and writing through that mechanism.
  • (half fixed by manually declaring the function in the dylib) disabled humanized formatting of numbers (ie appending K, M, G etc) because I couldn't immediately find stdutil.h anywhere. Although the dylib exists so maybe it can be made to work. Update: the dylib includes humanize_number (for formatting) but not expand_number (for parsing). So I half fixed this.

About

Simple Mac port of FreeBSD's https://github.com/freebsd/freebsd/tree/master/usr.bin/posixshmcontrol


Languages

Language:C 72.2%Language:Roff 27.3%Language:Shell 0.5%