aboutsummaryrefslogtreecommitdiff
path: root/bb.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-10-13 18:41:48 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-10-13 18:41:48 -0700
commit6ffe39308b3e102c830510c2f25d2224fdeac415 (patch)
tree14f746b6a0e1065844aefbeed658b76304e4c88f /bb.c
parent999c60c0991d30bc3cdfb2e185cae1770bc1a24c (diff)
Deprecated support for piping commands in to bb at startup (undocumented). Users should use xargs if they want to do that sort of thing.
Diffstat (limited to 'bb.c')
-rw-r--r--bb.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/bb.c b/bb.c
index 2ce3a00..f2ff0d0 100644
--- a/bb.c
+++ b/bb.c
@@ -1303,17 +1303,6 @@ int main(int argc, char *argv[])
}
}
- // Check whether anything was piped in to begin with,
- // and if so, treat it as commands
- struct pollfd pfd = {STDIN_FILENO, POLLIN, 0};
- if (poll(&pfd, 1, 0) == 1 && pfd.revents & POLLIN) {
- ssize_t len;
- char buf[1024];
- while ((len = read(STDIN_FILENO, buf, sizeof(buf))) > 0)
- write(cmdfd, buf, (size_t)len);
- write(cmdfd, "\0", 1);
- }
-
if (cmdfd != -1) {
close(cmdfd);
cmdfd = -1;