Deprecated support for piping commands in to bb at startup (undocumented). Users should use xargs if they want to do that sort of thing.
This commit is contained in:
parent
999c60c099
commit
6ffe39308b
11
bb.c
11
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) {
|
if (cmdfd != -1) {
|
||||||
close(cmdfd);
|
close(cmdfd);
|
||||||
cmdfd = -1;
|
cmdfd = -1;
|
||||||
|
3
bb.h
3
bb.h
@ -8,7 +8,6 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <poll.h>
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -26,7 +25,7 @@
|
|||||||
#include "bterm.h"
|
#include "bterm.h"
|
||||||
|
|
||||||
// Macros:
|
// Macros:
|
||||||
#define BB_VERSION "0.17.0"
|
#define BB_VERSION "0.17.1"
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
#define PATH_MAX 4096
|
#define PATH_MAX 4096
|
||||||
|
Loading…
Reference in New Issue
Block a user