-
Notifications
You must be signed in to change notification settings - Fork 258
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
LD_PRELOAD-based unbuffering #243
Labels
Comments
quantum5
added a commit
that referenced
this issue
Dec 3, 2017
quantum5
added a commit
that referenced
this issue
Dec 3, 2017
quantum5
added a commit
that referenced
this issue
Dec 3, 2017
quantum5
added a commit
that referenced
this issue
Dec 3, 2017
quantum5
added a commit
that referenced
this issue
Dec 3, 2017
quantum5
added a commit
that referenced
this issue
Dec 3, 2017
quantum5
added a commit
that referenced
this issue
Dec 3, 2017
quantum5
added a commit
that referenced
this issue
Dec 4, 2017
quantum5
added a commit
that referenced
this issue
Dec 4, 2017
This is functional and passes all unit tests. |
I hesitate to conclude this will not break any non-libc languages. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A simple solution to the fact that pseudo-ttys are both a headache and don't currently work.
nobuffer.cpp:
Compile with
gcc -shared -fPIC -o nobuffer.so nobuffer.cpp
, and pass inLD_PRELOAD=nobuffer.so
to user submissions. The compilation step can be done insetup.py
.This will force an unbuffered mode for all languages depending on
libc
for IO. This excludes languages like Python, which handles their own (Python buffering is already handled separately by the judge), but includes all languages compiled with GCC. It also does not include Pascal, which does not linklibc
, but who uses Pascal?With this change implemented, we could easily support unbuffered IO for ~97% of the languages used by volume. The current pty-based implementation can be gutted.
The text was updated successfully, but these errors were encountered: