Compare commits

3 Commits

Author SHA1 Message Date
dependabot[bot]
fd5513fb79 Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-03 22:53:45 +00:00
03d74e2756 init: add failed to start message 2024-07-16 21:10:52 +02:00
fdd5e44092 init: fix ls segfault 2024-07-16 21:08:30 +02:00
2 changed files with 10 additions and 4 deletions

View File

@@ -148,7 +148,7 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y cmake build-essential pax gcc g++ nasm bison bzip2 flex mtools texinfo libgmp-dev libmpfr-dev libmpc-dev xorriso
- name: Download toolchain
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: toolchain-ficus
path: ${{github.workspace}}

View File

@@ -11,7 +11,11 @@
void ls(char *dname) {
while (dname[0] == ' ' && dname[0] != '\0') dname++;
DIR *rfd = opendir(dname);
DIR *rfd = opendir(dname);
if (rfd == NULL) {
printf("Unknown directory: %s\n", dname);
return;
}
struct dirent *cur = readdir(rfd);
while (cur) {
printf("%s\n", cur->d_name);
@@ -45,9 +49,11 @@ int main() {
} else if (strcmp(line, "tasks") == 0) {
print_tasks();
} else {
if (fork() == 0)
if (fork() == 0) {
execve(line, 0, 0);
else
printf("Failed to start: %s\n", line);
return 0;
} else
wait(NULL);
}
}