While trying to save `pstree -ap` output to a file and I'm getting a really strange error: $ pstree -ap > pstree.txt File size limit exceeded Of course, I don't have any filesize limit on this system: $ ulimit -f unlimited It turns out that pstree itself sets the filesize limit -- probably in some kind of a sandboxing effort: $ strace -e /limit pstree -ap > /dev/null prlimit64(0, RLIMIT_NPROC, {rlim_cur=0, rlim_max=0}, NULL) = 0 prlimit64(0, RLIMIT_FSIZE, {rlim_cur=0, rlim_max=0}, NULL) = 0 prlimit64(0, RLIMIT_NOFILE, {rlim_cur=0, rlim_max=0}, NULL) = 0 +++ exited with 0 +++ So, obvious workaround like intermediate `cat` works: $ pstree -ap | cat > pstree.txt $ echo $? 0 $ wc pstree.txt 578 2120 22017 pstree.txt But, well, such limitation on where output can go definitely looks like a bug to me.
psmisc-23.3-alt3 -> sisyphus: Sat Sep 04 2021 Vitaly Chikunov <vt@altlinux> 23.3-alt3 - Fix output redirect (closes: #40857).
*** Bug 41600 has been marked as a duplicate of this bug. ***