From 851ecf8f4d3334581087eddb979c975edf7a7058 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 30 Nov 2015 15:21:34 +0100 Subject: m + add man page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- COPYING | 2 +- Makefile | 20 ++++-- doc/man/cmdipc.1 | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 203 insertions(+), 6 deletions(-) create mode 100644 doc/man/cmdipc.1 diff --git a/COPYING b/COPYING index bc88448..55def4e 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,5 @@ cmdipc — System V and POSIX IPC from the command line -Copyright © 2014 Mattias Andrée (maandree@member.fsf.org) +Copyright © 2014, 2015 Mattias Andrée (maandree@member.fsf.org) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Makefile b/Makefile index 576e8a8..3d40f34 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,10 @@ DATADIR = $(PREFIX)$(DATA) DOCDIR = $(DATADIR)/doc # The info manual documentation path including prefix INFODIR = $(DATADIR)/info +# The man page documentation path including prefix +MANDIR = $(DATADIR)/man +# The man page section 1 path including prefix +MAN1DIR = $(MANDIR)/man1 # The license base path including prefix LICENSEDIR = $(DATADIR)/licenses @@ -127,28 +131,33 @@ install-license: # Install documentation .PHONY: install-doc -install-doc: install-info install-pdf install-ps install-dvi +install-doc: install-info install-pdf install-ps install-dvi install-man .PHONY: install-info -install-info: cmdipc.info +install-info: bin/cmdipc.info install -dm755 -- "$(DESTDIR)$(INFODIR)" install -m644 $< -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info" .PHONY: install-pdf -install-pdf: cmdipc.pdf +install-pdf: bin/cmdipc.pdf install -dm755 -- "$(DESTDIR)$(DOCDIR)" install -m644 $< -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf" .PHONY: install-ps -install-ps: cmdipc.ps +install-ps: bin/cmdipc.ps install -dm755 -- "$(DESTDIR)$(DOCDIR)" install -m644 $< -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps" .PHONY: install-dvi -install-dvi: cmdipc.dvi +install-dvi: bin/cmdipc.dvi install -dm755 -- "$(DESTDIR)$(DOCDIR)" install -m644 $< -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi" +.PHONY: install-man +install-man: + install -dm755 -- "$(DESTDIR)$(MAN1DIR)" + install -m644 doc/man/cmdipc.1 -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1" + # Uninstall rules @@ -162,6 +171,7 @@ uninstall: -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf" -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps" -rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi" + -rm -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1" diff --git a/doc/man/cmdipc.1 b/doc/man/cmdipc.1 new file mode 100644 index 0000000..6a81920 --- /dev/null +++ b/doc/man/cmdipc.1 @@ -0,0 +1,187 @@ +.TH CMDIPC 1 CMDIPC +.SH NAME +cmdipc - System V and POSIX IPC from the command line +.SH SYNOPSIS +.B cmdipc +\-Q +.RI [ OPTION ]...\ [receive] +.br +.B cmdipc +\-Q +.RI [ OPTION ]...\ send +[\-\-] +.I MESSAGE +.br +.B cmdipc +\-S +.RI [ OPTION ]...\ [p|v|z|read] +.br +.B cmdipc +\-S +.RI [ OPTION ]...\ set +.I VALUE +.br +.B cmdipc +\-M +.RI [ OPTION ]...\ [read] +.br +.B cmdipc +\-M +.RI [ OPTION ]...\ write +[\-\-] +.I DATA +.br +.B cmdipc +\-X +.RI [ OPTION ]...\ [enter|leave] +.br +.B cmdipc +\-C +.RI [ OPTION ]...\ [enter|leave|wait] +.br +.B cmdipc +\-C +.RI [ OPTION ]...\ notify +[all] +.br +.B cmdipc +\-C +.RI [ OPTION ]...\ broadcast +.br +.B cmdipc +\-B +.RI [ OPTION ]...\ THRESHOLD +[enter] +.br +.B cmdipc +\-B +.RI [ OPTION ]...\ --remove +.br +.B cmdipc +\-L +.RI [ OPTION ]...\ [shared\ [un]lock] +.br +.B cmdipc +\-L +.RI [ OPTION ]...\ exclusive\ [un]lock +.br +.B cmdipc +\-R +.RI [ OPTION ]...\ [\-\-] +.RI [ MESSAGE ] +.br +.B cmdipc +\-\-ftok +.I PATH +.I ID +.SH DESCRIPTION +System V and POSIX interprocess communication from the command +line. In addition to the primities shared memory, message queue +and semaphores, this tool can from these primitives construct +mutexes, conditions, barriers, shared locks and rendezvous. +.SH OPTIONS +.TP +.BR \-h ,\ \-\-help +Prints this help message and exits. +.TP +.BR \-k ,\ \-\-key \ \fIKEY\fP +The key (SysV) or name (POSIX) of the item. +.TP +.BR \-m ,\ \-\-mode \ \fIOCTAL\fP +The mode for the item. +.TP +.BR \-s ,\ \-\-size \ \fISIZE\fP +Maximum size for messages. +.TP +.BR \-z ,\ \-\-spool \ \fISIZE\fP +Maximum number of messages. +.TP +.BR \-t ,\ \-\-type \ \fITYPE\fP +Message type. +.TP +.BR \-p ,\ \-\-priority \ \fIPRIO\fP +Message priority. +.TP +.BR \-d ,\ \-\-delta \ \fIDELTA\fP +Semaphore value increment. +.TP +.BR \-i ,\ \-\-initial \ \fIVALUE\fP +Initial semaphore value. +.TP +.BR \-b ,\ \-\-timeout \ \fISECS\fP +Semaphore V/Z timeout, in seconds. +.TP +.BR \-l ,\ \-\-length \ \fILEN\fP +Shared memory read length. +.TP +.BR \-o ,\ \-\-offset \ \fIOFF\fP +Shared memory read/write offset. +.TP +.BR \-r ,\ \-\-remove +Remove unit. +.TP +.BR \-n ,\ \-\-nonblocking +Do not block, exit with 2 if busy. +.TP +.BR \-c ,\ \-\-create +Create item. +.TP +.BR \-x ,\ \-\-exclusive +Create exclusive item. +.TP +.BR \-f ,\ \-\-ftok +Create unit ID, possibly non-unique. +.TP +.BR \-P ,\ \-\-posix +Use POSIX IPC rather than System V IPC. +.TP +.BR \-Q ,\ \-\-mqueue +Use message queue. +.TP +.BR \-S ,\ \-\-semaphore +Use semaphore. +.TP +.BR \-M ,\ \-\-shm +Use shared memory. +.TP +.BR \-X ,\ \-\-mutex +Use mutex. +.TP +.BR \-C ,\ \-\-condition +Use condition. +.TP +.BR \-B ,\ \-\-barrier +Use barrier. +.TP +.BR \-L ,\ \-\-shared-lock +Use shared lock. +.TP +.BR \-R ,\ \-\-rendezvous +Use rendezvous. +.SH RATIONALE +Interprocess communication in the command line enables much +more interesting use of shell scripts. +.SH "SEE ALSO" +.BR bus (1), +.BR ipcs (1), +.BR ipcrm (1), +.BR ipcmk (1), +.BR flock (1), +.BR mkfifo (1), +.BR ipcmd +.PP +Full documentation available locally via: info \(aq(cmdipc)\(aq +.SH AUTHORS +Principal author, Mattias Andrée. See the COPYING file for the full +list of authors. +.SH LICENSE +Copyright \(co 2014, 2015 Mattias Andrée +.br +License GPLv3+: GNU GPL version 3 or later . +.br +This is free software: you are free to change and redistribute it. +.br +There is NO WARRANTY, to the extent permitted by law. +.SH BUGS +Please report bugs to https://github.com/maandree/cmdipc/issues or to +maandree@member.fsf.org -- cgit v1.2.3-70-g09d2