summary refs log tree commit diff
path: root/.bin/pbd.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2017-05-01 14:59:17 -0400
committerJune McEnroe <june@causal.agency>2017-05-01 14:59:17 -0400
commit27def32d9431a61db1e7ec93fbe43006c90ae9b6 (patch)
treeccfe4b962a2b9acac305c04dbc1d015d7fee3485 /.bin/pbd.c
parentUse EX_OK in pbcopy (diff)
downloadsrc-27def32d9431a61db1e7ec93fbe43006c90ae9b6.tar.gz
src-27def32d9431a61db1e7ec93fbe43006c90ae9b6.zip
Clean up style in pbd
Diffstat (limited to '.bin/pbd.c')
-rwxr-xr-x.bin/pbd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/.bin/pbd.c b/.bin/pbd.c
index b01f80c3..e7b61d12 100755
--- a/.bin/pbd.c
+++ b/.bin/pbd.c
@@ -23,8 +23,9 @@ static void spawn(const char *cmd, int childFd, int parentFd) {
         pid_t wait = waitpid(pid, &status, 0);
         if (wait < 0) err(EX_OSERR, "waitpid");
 
-        if (status)
+        if (status) {
             warnx("child %s status %d", cmd, status);
+        }
     } else {
         int fd = dup2(parentFd, childFd);
         if (fd < 0) err(EX_OSERR, "dup2");
@@ -62,7 +63,9 @@ int main() {
         ssize_t peek = recv(client, &p, 1, MSG_PEEK);
         if (peek < 0) err(EX_IOERR, "recv");
 
-        if (peek) spawn("pbcopy", STDIN_FILENO, client);
+        if (peek) {
+            spawn("pbcopy", STDIN_FILENO, client);
+        }
 
         error = close(client);
         if (error) err(EX_IOERR, "close");
nciple following some conversations I had about open source, corporations and copyleft. 2017-09-01Revert "Add client readOnly mode"June McEnroe This reverts commit 34f25ae40a3db9369e9d98b3814f2b93bbc21451. 2017-09-01Remove clientRemove call from clientCastJune McEnroe If an error occurs on a client socket during a broadcast, that client will show up in the kqueue loop with EV_EOF and get removed that way. Tested by sending SIGKILL to a client and watching its cursor disappear. 2017-09-01Add client readOnly modeJune McEnroe 2017-08-31Clean up merge toolJune McEnroe Choose the version with the most recent access if the modify times are the same. 2017-08-31Choose B for tiles with equal modify timesJune McEnroe This way newer access counts and times will be preserved. 2017-08-31Add quick data file merge toolJune McEnroe Hopefully I won't have to use it ever again. 2017-08-30Use only foreground color for selecting spawnJune McEnroe 2017-08-29Add four additional spawnsJune McEnroe 2017-08-28Add respawningJune McEnroe 2017-08-26Move license above includesJune McEnroe Why was it down there? 2017-08-26Snapshot metadataJune McEnroe 2017-08-26Add meta.c to READMEJune McEnroe 2017-08-26Use MakefileJune McEnroe