unbuffered-output

Oracle PL/SQL - tips for immediate output / console printing

懵懂的女人 提交于 2019-12-18 03:11:51
问题 I have a number of pl/sql procedures that can take several minutes to run. While developing them, I've added a few print statements to help debug and also provide some feedback and progress indicators. Initially, I ran these on small test sets and output was almost instantaneous. Now that I'm testing with larger test sets that take several minutes to run, I find that printing to the console is no longer suitable, because nothing gets printed until the procedure ends. I'm used to working in

Detecting when a child process is waiting for input

爱⌒轻易说出口 提交于 2019-12-03 04:52:40
问题 I'm writing a Python program for running user-uploaded arbitrary (and thus, at the worst case, unsafe, erroneous and crashing) code on a Linux server. The security questions aside, my objective is to determine, if the code (that might be in any language, compiled or interpreted) writes the correct things to stdout , stderr and other files on given input fed into the program's stdin . After this, I need to display the results to the user. The current solution Currently, my solution is to spawn

Detecting when a child process is waiting for input

眉间皱痕 提交于 2019-12-02 19:14:16
I'm writing a Python program for running user-uploaded arbitrary (and thus, at the worst case, unsafe, erroneous and crashing) code on a Linux server. The security questions aside, my objective is to determine, if the code (that might be in any language, compiled or interpreted) writes the correct things to stdout , stderr and other files on given input fed into the program's stdin . After this, I need to display the results to the user. The current solution Currently, my solution is to spawn the child process using subprocess.Popen(...) with file handles for the stdout , stderr and stdin .

What is the equivalent of unbuffer program on Windows?

前提是你 提交于 2019-11-27 04:33:32
Hi according to this post , unbuffer connects to a command via a pseudo-terminal (pty), which makes the system treat it as an interactive process, therefore not using any stdout buffering. I would like to use this function on Windows. May I know what is the equivalent of unbuffer program on Windows? Thanks. The behaviour you're describing is typical of applications using run-time libraries for I/O. By default, most runtime libraries check to see whether the handle is a character mode device such as a console, and if so, they don't do any buffering. (Ideally the run-time library would treat a

bash: force exec'd process to have unbuffered stdout

╄→尐↘猪︶ㄣ 提交于 2019-11-26 18:58:27
I've got a script like: #!/bin/bash exec /usr/bin/some_binary > /tmp/my.log 2>&1 Problem is that some_binary sends all of its logging to stdout, and buffering makes it so that I only see output in chunks of a few lines. This is annoying when something gets stuck and I need to see what the last line says. Is there any way to make stdout unbuffered before I do the exec that will affect some_binary so it has more useful logging? (The wrapper script is only setting a few environment variables before the exec, so a solution in perl or python would also be feasible.) You might find that the unbuffer

What is the equivalent of unbuffer program on Windows?

我与影子孤独终老i 提交于 2019-11-26 11:16:34
问题 Hi according to this post, unbuffer connects to a command via a pseudo-terminal (pty), which makes the system treat it as an interactive process, therefore not using any stdout buffering. I would like to use this function on Windows. May I know what is the equivalent of unbuffer program on Windows? Thanks. 回答1: The behaviour you're describing is typical of applications using run-time libraries for I/O. By default, most runtime libraries check to see whether the handle is a character mode

bash: force exec'd process to have unbuffered stdout

前提是你 提交于 2019-11-26 06:43:37
问题 I\'ve got a script like: #!/bin/bash exec /usr/bin/some_binary > /tmp/my.log 2>&1 Problem is that some_binary sends all of its logging to stdout, and buffering makes it so that I only see output in chunks of a few lines. This is annoying when something gets stuck and I need to see what the last line says. Is there any way to make stdout unbuffered before I do the exec that will affect some_binary so it has more useful logging? (The wrapper script is only setting a few environment variables