-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vfscore: Support closing STD{IN,OUT,ERR} file descriptors #41
Comments
I guess we would need to introduce a destructor table where libraries can register clean-up work like this. The dtors would get called on machine shutdown. |
@skuenzer This has nothing to do with cleaning up on shutdown. It just fixes calls such as |
In such a case, I expect that we get a bit more clean solution with introducing fdtable: #52 . STDIN, STDOUT, STDERR should register a close fd-handler. |
Because `fetch` was not really a file, make always tried to remake the version file. Therefore, it also needed to recompile the file as the mtime of the version file was updated. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
While musl doesn't provide an actual implementation for the legacy ucontext API, the header is still useful to compile software against musl. Also, some software only relies on the definitions in the header. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
This header is deprecated but sometimes still used by software. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
The signals are currently ignored and that causes musl to `exit` the thread, which doesn't cause any output. Therefore, it's very unclear what happened. By calling `UK_CRASH` there is a clear indication that something went wrong. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
On clang, this statement caused compiler errors instead of only warnings. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
The `sys/resource.h` header adds #define-based redirection from `prlimit64` to `prlimit` when `_GNU_SOURCE` is set. This causes our `provided_syscalls` to incorrectly define `uk_syscall_r_prlimit` instead of `uk_syscall_r_prlimit64`. By reordering, the headers we can side-step this problem. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
The real one provided in `mprotect.c` works with the `mprotect` system call introduced with the posix-mmap library. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
If these fields are not initialized as expected by musl, then calls to pthread functions such `pthread_getspecific` can return unexpected values or even crash. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#41
The initial release of
vfscore
library did not introduce closing of standard file descriptors. This is also mentioned in the code here. The underlying structure for standard file descriptors is statically allocated, unlike ordinary file descriptors. A proper fix should allocate these dynamically as well.The text was updated successfully, but these errors were encountered: