Skip to main content

New answers tagged

0 votes

Flush the pipe/printf buffers externally for already running process with known PID

The answer from user313992 is nearly the best way and is at least likely to work with other binaries as well. Explanation: start gdb without any output, attach to pid, execute flush, implicit: get out....
Simon Sobisch's user avatar
0 votes

Capturing output from a bash function without using a subshell

This might work for you: $ cat runcmd #!/usr/bin/env bash tmpout=$(mktemp) || exit tmperr=$(mktemp) || exit trap 'rm -f -- "$tmpout" "$tmperr"; exit' EXIT while IFS= read -r -a ...
Ed Morton's user avatar
  • 31.7k

Top 50 recent answers are included