fixed xargs

This commit is contained in:
Your Name 2025-05-04 23:19:28 +03:00
parent 035d64a2fb
commit 7462b0978c

View file

@ -30,6 +30,7 @@ static char i_flag;
enum {
NORMAL,
CEOF,
R_FLAG,
ERROR,
STOP
};
@ -191,7 +192,7 @@ static int xargs(void) {
}
if (args_passed == 0 && ret != ERROR)
ret = CEOF;
ret = R_FLAG;
free(arg);
return ret;
@ -319,7 +320,7 @@ int main(int argc, char **argv) {
if (stdin_stat == NORMAL)
ret = spawn();
else if (!r_flag && args_added == 0)
else if (stdin_stat == R_FLAG && !r_flag)
ret = spawn();
clear_cmd();