mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-28 16:17:51 +01:00
Compare commits
3 Commits
a4ff116382
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd5513fb79 | ||
| 03d74e2756 | |||
| fdd5e44092 |
2
.github/workflows/ficus.yml
vendored
2
.github/workflows/ficus.yml
vendored
@@ -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}}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user