feature/train_bash #7

Merged
walleri1 merged 18 commits from feature/train_bash into main 2025-02-15 12:00:00 +03:00
7 changed files with 26 additions and 0 deletions
Showing only changes of commit 78b1633710 - Show all commits

BIN
bash/rest.zip Normal file

Binary file not shown.

0
c/task.c → bash/train_bash/concurrente.sh Normal file → Executable file
View File

BIN
c/pause Executable file

Binary file not shown.

6
c/pause.c Normal file
View File

@ -0,0 +1,6 @@
#include <unistd.h>
int main(void) {
pause();
return 0;
}

View File

14
python/fork.py Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/python3
import os, sys
ret = os.fork()
if ret == 0:
print("child process: pid={}, parent process's pid={}".format(os.getpid(), os.getppid()))
os.execve("/bin/echo", ["echo", "hello from pid={} ".format(os.getpid())], {})
exit()
elif ret > 0:
print("parent process: pid={}, child process's pid={}".format(os.getpid(), ret))
exit()
sys.exit(1)

6
python/spawn.py Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/python3
import os
os.posix_spawn("/bin/echo", ["echo", "echo", "created by posix_spawn()"], {})
print("created echo command")