sh+edit: Miscellaneous fixes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e76ccd6c4c
commit
54a4ebe5bb
@ -25,7 +25,6 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
char* rc = fgets(buffer, sizeof(buffer), stdin);
|
char* rc = fgets(buffer, sizeof(buffer), stdin);
|
||||||
if (rc == 0) break;
|
if (rc == 0) break;
|
||||||
if (!strcmp(rc, "EOF\n")) break;
|
|
||||||
fputs(buffer, f);
|
fputs(buffer, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +85,8 @@ int main()
|
|||||||
char* rc = fgets(command, sizeof(command), stdin);
|
char* rc = fgets(command, sizeof(command), stdin);
|
||||||
if (!rc) return 0;
|
if (!rc) return 0;
|
||||||
|
|
||||||
|
if (strspn(command, " \n") == strlen(command)) continue;
|
||||||
|
|
||||||
pid_t child = fork();
|
pid_t child = fork();
|
||||||
if (child < 0)
|
if (child < 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user