summary refs log tree commit diff
path: root/.bin/pbd.c
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2017-05-01 14:59:17 -0400
committerJune McEnroe <programble@gmail.com>2017-05-01 14:59:17 -0400
commit810c6fe543c155a9964b075d7937a76b012c441b (patch)
tree576a67af39b6f5c3a1f3c67f02481676e5c817a8 /.bin/pbd.c
parentUse EX_OK in pbcopy (diff)
downloadsrc-810c6fe543c155a9964b075d7937a76b012c441b.tar.gz
src-810c6fe543c155a9964b075d7937a76b012c441b.zip
Clean up style in pbd
Diffstat (limited to '')
-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");
class='logmsg'> 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe