diff options
-rw-r--r-- | doc/bus-listen.1 | 2 | ||||
-rw-r--r-- | doc/bus-wait.1 | 2 | ||||
-rwxr-xr-x | doc/examples/audio-volume-control/monitor | 2 | ||||
-rw-r--r-- | src/cmdline.c | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/doc/bus-listen.1 b/doc/bus-listen.1 index 84d0316..0d5b9ba 100644 --- a/doc/bus-listen.1 +++ b/doc/bus-listen.1 @@ -7,7 +7,7 @@ bus listen - Listen for new messages on a bus .IR command .SH DESCRIPTION Listen for new messages on the bus associated with \fIpathname\fP. Once -a message is received, \fIcommand\fP will be spawned with \fI$arg\fP set +a message is received, \fIcommand\fP will be spawned with \fI$msg\fP set to the received message. POSIX shell syntax applies to \fIcommand\fP. .SH EXIT STATUS .TP diff --git a/doc/bus-wait.1 b/doc/bus-wait.1 index 65a9634..5fec137 100644 --- a/doc/bus-wait.1 +++ b/doc/bus-wait.1 @@ -8,7 +8,7 @@ bus wait - Listen for a new message on a bus .SH DESCRIPTION Listen for a new message on the bus associated with \fIpathname\fP, stop listening once a message has been received. Once a message is received, -\fIcommand\fP will be spawned with \fI$arg\fP set to the received +\fIcommand\fP will be spawned with \fI$msg\fP set to the received message. POSIX shell syntax applies to \fIcommand\fP. .SH EXIT STATUS .TP diff --git a/doc/examples/audio-volume-control/monitor b/doc/examples/audio-volume-control/monitor index 82fe7bc..4956f7b 100755 --- a/doc/examples/audio-volume-control/monitor +++ b/doc/examples/audio-volume-control/monitor @@ -11,5 +11,5 @@ exec 2>/dev/null printf '\e[?1049h\e[H\e[2J' trap -- "printf '\e[?1049l'" SIGINT -bus listen "/tmp/example-bus" \'"${0/\'/\'\\\'\'}"\'' "${arg}"' +bus listen "/tmp/example-bus" \'"${0/\'/\'\\\'\'}"\'' "${msg}"' diff --git a/src/cmdline.c b/src/cmdline.c index 7f62ece..69adae2 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -69,7 +69,7 @@ spawn_continue(const char *message, void *user_data) return 1; if ((pid = fork())) return pid == -1 ? -1 : 1; - setenv("arg", message, 1); + setenv("msg", message, 1); execlp("sh", "sh", "-c", command, NULL); perror(argv0); exit(1); @@ -92,7 +92,7 @@ spawn_break(const char *message, void *user_data) return 1; if ((pid = fork())) return pid == -1 ? -1 : 0; - setenv("arg", message, 1); + setenv("msg", message, 1); execlp("sh", "sh", "-c", command, NULL); perror(argv0); exit(1); |