3 ms·How could curl detect where it's piped to?by mr_mitm 3y agoHow could curl detect where it's piped to?take-five 3y agoSomething like (in Python) os.isatty(sys.stdout.fileno())Zambyte 3y agoThat doesn't say where it's piped though. It could be redirected to a file, or piped to something harmless like jq.timando 3y agoIterate through /proc/<pid>/fd and check for the pipe id in the symlink target.