mirror of https://github.com/ericonr/erm.git
Close stdin on program launch.
It's unused and can give us an extra file descriptor.
This commit is contained in:
parent
fe0c1705b2
commit
3db1db5cf4
3
erm.c
3
erm.c
|
@ -19,6 +19,9 @@ int main(int argc, char **argv)
|
||||||
bool recursive = false;
|
bool recursive = false;
|
||||||
bool stop_at_error = true;
|
bool stop_at_error = true;
|
||||||
|
|
||||||
|
/* we don't use stdin, so give ourselves an extra fd */
|
||||||
|
fclose(stdin);
|
||||||
|
|
||||||
int opt;
|
int opt;
|
||||||
while ((opt = getopt(argc, argv, "reh")) != -1) {
|
while ((opt = getopt(argc, argv, "reh")) != -1) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
|
|
Loading…
Reference in New Issue