[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] How to create a real copy of file descriptors stdout / s
From: |
Patrick Schleizer |
Subject: |
Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr? |
Date: |
Tue, 28 Feb 2017 14:28:00 +0000 |
The following worked for me.
echo "int isatty(int fd) { return 1; }" | gcc -O2 -fpic -shared -ldl -o
"$isatty_so_file" -xc -
LD_PRELOAD+=" $isatty_so_file
LD_PRELOAD="$LD_PRELOAD" apt-get "$@" 2>&1 | tee -a "$logfile"
gcc compilation on the fly seems crazy but was a worthwhile test.
Is there some pre-build command line tool isatty or shared object isatty.so?
For now, ending up using the following.
python -c 'import pty, sys; pty.spawn(sys.argv[1:])' \
| apt-get "$@" 2>&1 \
| tee -a "$logfile"
- [Help-bash] How to create a real copy of file descriptors stdout / stderr?, Patrick Schleizer, 2017/02/26
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, João Eiras, 2017/02/27
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, Patrick Schleizer, 2017/02/27
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, João Eiras, 2017/02/27
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, Patrick Schleizer, 2017/02/27
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, João Eiras, 2017/02/27
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?,
Patrick Schleizer <=
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, Branden Robinson, 2017/02/28
- Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, Greg Wooledge, 2017/02/28
Message not available
Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?, Greg Wooledge, 2017/02/27