At the time of filing this bug report, I used to use pstree to determine if a
script was called from cron or an interactive terminal, but I found a simpler
solution by inspecting the $TERM environment variable.
I guess the number of "users affected" dropped by 1 ;)
Thanks for your updates guys.
** Description changed:
At random occasions, pstree returns "/proc/: No such file or directory"
on stderr. No output on stdout is produced.
I can reproduce the problem using this script:
#!/bin/bash
for i in $(seq 1 1000); do
- unset p
- p=$(pstree -s -A $$
Public bug reported:
At random occasions, pstree returns "/proc/: No such file or directory" on
stderr. No output on stdout is produced.
I can reproduce the problem using this script:
#!/bin/bash
for i in $(seq 1 1000); do
unset p
p=$(pstree -s -A $$ 2>/dev/null)
if