3 ms·
What do you mean by I/O exactly? Because to me handling HTTP requests definitely requires I/O, no matter how you technically implement it. Does the program star
by winternewt 2y ago
What do you mean by I/O exactly? Because to me handling HTTP requests definitely requires I/O, no matter how you technically implement it. Does the program start anew with new arguments for each HTTP request, and if so how is that an improvement over I/O syscalls?
- nine_k 2y agoHandling HTTP requests can be done entirely via stdin + stdout. But it won't be too useful if you could not even talk to a database. The VM may (and should) be limited to a small subset of what's available on the host though.
- winternewt 2y agoBut in order to read from stdin and write to stdout, you must make I/O syscalls.
- cryptonector 2y agoI mean you don't get to open files, sockets, devices, etc. in the sandboxed program. You get to do just a few minimal things like I/O on stdin/stdout/stderr, use shared memory, maybe allocate memory.
- winternewt 2y agoSo how do you do I/O on stdin/stdiout/stderr without syscalls?
- cryptonector 2y agoThere's a tiny kernel, and there are syscalls, because after all the executable is -though ELF- a statically linked executable with a statically linked libc, but that mini kernel only handles very few system calls, and does not provide the full generality of Linux. Yes I shouldn't have said "there's no syscalls", just no generic I/O.