Florian Fischer
dea54c7dae
libc: prevent execvpe to search for files containing '/'
...
The current implementation always searches for the file in PATH
if it is not an absolute path.
This prevents executing relative paths like ./executable.
As specified by exec(3) the p-family of exec functions only search if
the filename does not contain slash '/' characters.
2024-02-14 11:37:06 +01:00
Enrico Fraccaroli (Galfurian)
30e01ba560
Update version
2024-01-17 13:49:48 +01:00
Florian Fischer
6f4d3b57f9
libc: fix waitpid not detecting process termination
...
Since 452aa40770 and the change to
properly return processes exit codes in the status argument, the
status will never be EXIT_ZOMBIE(16) except a process was terminated by
signal(16).
Return from waitpid if either an error occurred (__res < 0) or
we got the status of a child process (__res == cpid).
Additionally fix the weird alignment of the closing braces.
2024-01-13 14:31:00 +01:00
Enrico Fraccaroli (Galfurian)
7ce609fddc
Fix compilation with clang 15.0.7
2023-11-28 10:10:28 -05:00
Enrico Fraccaroli (Galfurian)
f066dd2ad9
Add support for reading symlinks
2023-11-21 14:20:41 -05:00
Enrico Fraccaroli (Galfurian)
1197797ee1
Add symlink function (not yet implemented in ext2)
2023-09-01 11:17:40 -04:00
Enrico Fraccaroli (Galfurian)
163e83009d
Make tokenize work with a const char pointer.
2023-08-30 15:38:52 -04:00
Enrico Fraccaroli (Galfurian)
ecf5907f83
Transform readline into a globally accessible function.
2023-08-30 15:38:24 -04:00
Enrico Fraccaroli (Galfurian)
78c1ff4bd4
Minor improvements to the string-related functions.
2023-08-30 11:51:25 -04:00
Enrico Fraccaroli (Galfurian)
d50d997d6e
Wrap single line statements inside braces.
2023-08-24 12:17:16 -04:00
Enrico Fraccaroli (Galfurian)
55b5eb8cee
Fix format, and dela with type casting.
2023-08-11 13:04:34 -04:00
Enrico Fraccaroli (Galfurian)
24ebe9647c
Minor format changes.
2023-08-11 11:37:30 -04:00
Enrico Fraccaroli (Galfurian)
16b905625d
Turn port-io into header-only.
2023-07-12 14:26:52 -04:00
Enrico Fraccaroli (Galfurian)
707c0e408b
Improve dec_to_binary function
2023-07-12 14:26:14 -04:00
Enrico Fraccaroli (Galfurian)
86e046d080
Minor naming changes inside port_io
2023-06-29 13:00:15 -04:00
Enrico Fraccaroli (Galfurian)
b7c82d7333
Rewrite realpath without memory allocation.
2023-06-23 15:02:17 -04:00
Enrico Fraccaroli (Galfurian)
7972ddeac7
- Add missing comments;
...
- Reimplement a more safer dirname;
- Implement a simple and safe tokenize function;
2023-06-23 14:37:24 -04:00
Enrico Fraccaroli (Galfurian)
ef6ef96576
Standardize the way we generate random numbers.
2023-06-22 15:42:00 -04:00
Enrico Fraccaroli (Galfurian)
a872442aa3
Finish reworking the heap.
2023-06-19 17:44:27 -04:00
Enrico Fraccaroli (Galfurian)
fb0323c8ce
Create a temporary solution to call a 6-arguments system call (specifically, mmap).
2023-06-09 15:36:03 -04:00
Enrico Fraccaroli (Galfurian)
c17153318c
Finish the implementation for message send, and receive. Implement their IPC_NOWAIT behaviour.
2023-06-08 17:06:42 -04:00
Enrico Fraccaroli (Galfurian)
f515c44eb3
Implement message send and receive functions.
2023-06-08 16:38:42 -04:00
Enrico Fraccaroli (Galfurian)
8891ed7d7a
Fix semop return type. Do some minor style-based fixes.
2023-06-02 13:49:10 -04:00
Enrico Fraccaroli (Galfurian)
1acec3e7b3
Fix third test program. Fix EAGAIN message.
2023-05-23 14:05:41 -04:00
Enrico Fraccaroli (Galfurian)
3e03f1e6fd
Clean up the semget example. Clean up the return values of semop function.
2023-05-19 14:24:04 -04:00
Enrico Fraccaroli
19e8ad309f
Move IPC stuff from the libc side, inside the sys folder.
2023-05-08 12:53:17 +02:00
Enrico Fraccaroli
e19354a9ee
Implement ipcs mechanisms.
2023-04-27 10:10:34 +02:00
Aldegheri Alessandro
09f0d145d0
IPCS, IPCRM, IPC_NOWAIT currently working
2023-04-22 16:14:40 +02:00
Aldegheri Alessandro
b9244ab96b
Merge between nsops fix and current ipcs and ipcrm implementation
2023-04-22 14:38:56 +02:00
Aldegheri Alessandro
ef1ae0f3c7
Currently working on ipcs and ipcrm commands
2023-04-22 14:33:13 +02:00
notBiji
dd8853af00
fixed nsops
2023-04-21 18:16:25 +02:00
Enrico Fraccaroli
8ad4e45b50
Add some more comments. Implement sempahore search function. Check correctness of the current semaphore code, and it works as expected.
2023-04-21 17:55:19 +02:00
Enrico Fraccaroli
32b8bd898c
Add all commments
2023-04-12 15:01:32 +02:00
Aldegheri Alessandro
cc4eed7788
First working implementation of System V Semaphores with working tests. Check for comments inside the code
2023-04-11 21:12:44 +02:00
Aldegheri Alessandro
1c4fd2c388
first implementation of ftok function with working test
2023-04-01 15:23:50 +02:00
Enrico Fraccaroli (Galfurian)
59d9bcb596
Fix wrong argument of write. Fix return type of getdents. Fix procfs_getdents. Finish implementing the base version of the ps command.
2023-01-27 11:38:40 -05:00
Enrico Fraccaroli (Galfurian)
32192829ff
Keep the same string.c in libc and mentos.
2023-01-24 13:26:37 -05:00
Enrico Fraccaroli
20323ba64e
Remove ansi_colors.h from the programs. Add the volatile keyword to the memset operations.
2023-01-20 09:22:37 -05:00
Enrico Fraccaroli
c9038205db
Update copyright years.
2023-01-19 10:09:52 -05:00
Enrico Fraccaroli
6e48298534
Fix missing newline at the end of file.
2023-01-18 14:56:57 -05:00
Enrico Fraccaroli
2fee354b4b
Remove mmio, port io, and debug headers from kernel side, and keep them on the libc. Simplify debugging functions. Add missing comments in several locations. Move ANSI color definitions in a separate file.
2023-01-18 11:40:53 -05:00
Enrico Fraccaroli
3f73b8d8a0
Add newline at the end of the files. Use built in keywords properly.
2022-12-13 14:31:27 -05:00
Enrico Fraccaroli
0965669f4b
Add newline at the end of the files.
2022-12-13 14:25:16 -05:00
Enrico Fraccaroli
de9daa4a85
Add some missing documentation. There is still some work to do.
2022-12-09 11:35:30 -05:00
Enrico Fraccaroli
5a461aabb0
Pass address of sigreturn as an arugment of signal and sigaction functions.
2022-09-22 11:31:23 -04:00
Enrico Fraccaroli
5e5b9ba370
Change how and where issue and motd are displayed
2022-08-26 15:09:46 -04:00
Enrico Fraccaroli (Galfurian)
0130725518
Just add missing comments.
2022-04-08 10:05:21 -04:00
Enrico Fraccaroli (Galfurian)
91af18b5a6
Do not print function name when debugging.
2022-01-31 15:18:37 -05:00
Enrico Fraccaroli (Galfurian)
1b2bc49d41
Update license and remove unused files.
2022-01-27 15:12:36 -05:00
Enrico Fraccaroli (Galfurian)
2944f5cc43
Clean un legacy files.
2022-01-27 11:29:12 -05:00