diff options
| author | Mattias Andrée <m@maandree.se> | 2026-02-22 14:33:45 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-02-22 14:33:45 +0100 |
| commit | 6abd1c366b809c7ad4e2fc850b72d2e7a2f247aa (patch) | |
| tree | d9723bb71f478935c246fedac58f8002ab134b87 | |
| parent | Update e-mail (diff) | |
| download | cmdipc-6abd1c366b809c7ad4e2fc850b72d2e7a2f247aa.tar.gz cmdipc-6abd1c366b809c7ad4e2fc850b72d2e7a2f247aa.tar.bz2 cmdipc-6abd1c366b809c7ad4e2fc850b72d2e7a2f247aa.tar.xz | |
Signed-off-by: Mattias Andrée <m@maandree.se>
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | DEPENDENCIES | 3 | ||||
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | README | 5 | ||||
| -rw-r--r-- | doc/info/cmdipc.texinfo | 73 | ||||
| -rw-r--r-- | doc/man/cmdipc.1 | 17 | ||||
| -rwxr-xr-x | src/__main__.py | 1 | ||||
| -rw-r--r-- | src/unified_posix_ipc.py | 1 | ||||
| -rw-r--r-- | src/unified_sysv_ipc.py | 1 |
9 files changed, 43 insertions, 67 deletions
@@ -14,4 +14,3 @@ __pycache__/ *.ps *.dvi *.info - diff --git a/DEPENDENCIES b/DEPENDENCIES index 6414937..246c984 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -5,7 +5,6 @@ RUNTIME DEPENDENCIES python-sysv_ipc argparser-python - BUILD DEPENDENCIES make @@ -15,9 +14,7 @@ BUILD DEPENDENCIES texinfo (for manuals) texlive-core (for pdf, ps, dvi manuals) - INSTALL DEPENDENCIES make coreutils - @@ -3,8 +3,7 @@ # notice and this notice are preserved. This file is offered as-is, # without any warranty. - -# The package path prefix, if you want to install to another root, set DESTDIR to that root +# The package path prefix; if you want to install to another root, set DESTDIR to that root PREFIX = /usr # The command path excluding prefix BIN = /bin @@ -102,7 +101,7 @@ bin/%.ps: doc/info/%.texinfo doc/info/fdl.texinfo .PHONY: install install: install-base install-info install-man -.PHONY: install +.PHONY: install-all install-all: install-base install-doc # Install base rules @@ -177,7 +176,6 @@ uninstall: # Clean rules -.PHONY: all +.PHONY: clean clean: -rm -r bin obj - @@ -21,8 +21,8 @@ SYNOPSIS 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 + line. In addition to the primitives shared memory, message queue + and semaphores, this tool can construct from these primitives mutexes, conditions, barriers, shared locks and rendezvous. OPTIONS @@ -61,4 +61,3 @@ SEE ALSO bus(1), ipcs(1), ipcrm(1), ipcmk(1), flock(1), mkfifo(1), ipcmd Full documentation available locally via: info '(cmdipc)' - diff --git a/doc/info/cmdipc.texinfo b/doc/info/cmdipc.texinfo index 1ab3c22..08b26a4 100644 --- a/doc/info/cmdipc.texinfo +++ b/doc/info/cmdipc.texinfo @@ -70,9 +70,9 @@ Texts. A copy of the license is included in the section entitled @chapter Overview System V and POSIX interprocess communication -from the command line. In addition to the primities +from the command line. In addition to the primitives shared memory, message queue and semaphores, this -tool can from these primitives construct mutexes, +tool can construct from these primitives mutexes, conditions, barriers, shared locks and rendezvous. @@ -80,19 +80,19 @@ conditions, barriers, shared locks and rendezvous. @node Invoking @chapter Invoking -@command{cmdipc} have support for eight types +@command{cmdipc} has support for eight types of interprocess communication units: message queues, semaphores, shared memory, mutexes @footnote{Because of the nature of this program, mutexes are a bit degraded.}, conditions, -barrers, shared locks and rendezvous. These +barriers, shared locks and rendezvous. These are constructed from either the three System V interprocess communication primitives: message queues, semaphores and shared memory, or their POSIX variants. The type of interprocess communication unit to use is selected by the -follow options, to use the POSIX variant rather -than the System V variant add the option +following options; to use the POSIX variant rather +than the System V variant, add the option @option{-P} (@option{--posix}). @table @option @@ -140,15 +140,15 @@ even if the key is already in use, in which case the unit will simply be opened. To fail if the key is already in use, use the option @option{-x} (@option{--exclusive}). @option{-x} -can be used with or without @option{-c}, it -is interpretation will does not depend on -@option{-c}, @option{-c} is implied by -@option{-x}. To remove a key, use the option +can be used with or without @option{-c}; +its interpretation does not depend on @option{-c}, +as @option{-c} is implied by @option{-x}. +To remove a key, use the option @option{-r} (@option{--remove}). There are two additional options that are recognised. These cannot be used with any -other optios. +other options. @table @option @item -h @@ -159,11 +159,11 @@ Print a list of all options. @itemx --ftok PATHNAME ID Print a key derived from an existing file and a project ID. The project ID -is a integer between the values 0 and -255, inclusively. The derived key is -probable to be non-unique. This is a +is an integer between the values 0 and +255, inclusive. The derived key is +likely to be non-unique. This is a System V IPC function, and is not -available, and are not necessary, for +available or necessary for POSIX IPC. @end table @@ -189,9 +189,9 @@ used without waiting for at most For a non primitive unit, the time to live is reset when it enters its next state. This could mean -that it could timeout anywhere -between the specifed time and -n times the specifed time when +that it could time out anywhere +between the specified time and +n times the specified time when n is the number of steps in the action that can block, which with the current units is at most 3. @@ -242,7 +242,7 @@ only the indicated type is allowed. If the value is negative, the first message of the lowest type that is at most the absolute value of the -specifed value is received. +specified value is received. @end table Recognised options for POSIX message queues: @@ -510,21 +510,21 @@ notify all: @chapter Barriers A barrier is a synchronisation primitive -that can be used to make sure the a number -of process continue their work at the same +that can be used to make sure that a number +of processes continue their work at the same time and do not fall out of sync with -eachother. A barrier blocks until a select -number of processes have reached it and the +each other. A barrier blocks until a selected +number of processes have reached it and then lets all of those processes continue. It does only have one verb: @option{enter}. The threshold, that is the number of -process that are synchronised, is specified +processes that are synchronised, is specified by the first non-option argument. If @option{enter} is used, the threshold is specified before @option{enter}. The -threshold most be specified both at +threshold must be specified both at construction and at usage. -Use of barriers are indicated by the +Use of barriers is indicated by the @option{-B} option. A ``System V'' barrier is constructed from @@ -534,7 +534,7 @@ difference is due to the lack of the @code{Z} for POSIX semaphores. The key for a ``System V'' barrier is -a integer-duo delimited by a full stop. +an integer duo delimited by a full stop. The key for a ``POSIX'' barrier is a juxtaposition of three ASCII strings: no NUL or slash, between 1 character and @@ -590,19 +590,19 @@ to a file or shared memory, you would apply an exclusive lock if you want to be able to modify the content of the memory and a shared lock if you only -which to be able to read it. This -guarantees both that two processes will +wish to be able to read it. This +guarantees both that no two processes will edit the memory at the same time and -cause corruption, and that not process +cause corruption, and that no process will modify the memory while another process is reading it, while allowing multiple processes to read the memory at the same time. -Use of shared locks are indicated by the +Use of shared locks is indicated by the @option{-L} option. The key for a ``System V'' shared lock is -a integer-trio delimited by full stops. +an integer trio delimited by full stops. The key for a ``POSIX'' shared lock is a juxtaposition of three ASCII strings: no NUL or slash, between 1 character and @@ -659,8 +659,8 @@ exclusive unlock: A rendezvous is like barrier, except it is fixed to synchronising two processes. When two processes meet at a rendezvous -they exchange a message with eachother. -Use of rendezvous are indicated by the +they exchange a message with each other. +Use of rendezvous is indicated by the @option{-R} option. @option{-R} inherits the @option{-s} and @option{-z} options from @option{-Q}. @@ -674,8 +674,8 @@ queues having priorities instead of types for messages. The key for a ``System V'' rendezvous is -a integer-trio delimited by full stops. -The key for a ``POSIX'' shared lock is a +an integer trio delimited by full stops. +The key for a ``POSIX'' rendezvous is a juxtaposition of four ASCII strings: no NUL or slash, between 1 character and 254 characters long, and prefixed with a @@ -721,4 +721,3 @@ slash. @include fdl.texinfo @bye - diff --git a/doc/man/cmdipc.1 b/doc/man/cmdipc.1 index b3f53b7..83ddf0d 100644 --- a/doc/man/cmdipc.1 +++ b/doc/man/cmdipc.1 @@ -76,8 +76,8 @@ cmdipc - System V and POSIX IPC from the command line .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 +line. In addition to the primitives shared memory, message queue +and semaphores, this tool can construct from these primitives mutexes, conditions, barriers, shared locks and rendezvous. .SH OPTIONS .TP @@ -171,16 +171,3 @@ more interesting use of shell scripts. .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 <http://gnu.org/licenses/gpl.html>. -.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 m@maandree.se diff --git a/src/__main__.py b/src/__main__.py index c20e65b..271612e 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -443,4 +443,3 @@ except ipc.PermissionsError: sys.exit(4) except ipc.ExistentialError: sys.exit(3) except ipc.BusyError: sys.exit(2) except: sys.exit(1) - diff --git a/src/unified_posix_ipc.py b/src/unified_posix_ipc.py index 0a83281..13dab60 100644 --- a/src/unified_posix_ipc.py +++ b/src/unified_posix_ipc.py @@ -119,4 +119,3 @@ class MessageQueue(posix_ipc.MessageQueue): def remove(self): self.unlink() self.close() - diff --git a/src/unified_sysv_ipc.py b/src/unified_sysv_ipc.py index 86e12d3..01ade4b 100644 --- a/src/unified_sysv_ipc.py +++ b/src/unified_sysv_ipc.py @@ -63,4 +63,3 @@ class MessageQueue(sysv_ipc.MessageQueue): return self.recv_(self, (timeout is None) or (timeout != 0), type) def close(self): pass - |
