tinyproxy-1.6.1 doesn't close stdin, stdout, stderr /etc/init.d/tinyproxy restart # a=$(tty) # echo $a /dev/pts/8 # lsof| grep tinyproxy | grep ${a} tinyproxy 1962 tinyproxy 0u CHR 136,8 915 /dev/pts/8 tinyproxy 1962 tinyproxy 1u CHR 136,8 915 /dev/pts/8 tinyproxy 1962 tinyproxy 2u CHR 136,8 915 /dev/pts/8 tinyproxy 1963 tinyproxy 0u CHR 136,8 915 /dev/pts/8 tinyproxy 1963 tinyproxy 1u CHR 136,8 915 /dev/pts/8 tinyproxy 1963 tinyproxy 2u CHR 136,8 915 /dev/pts/8 tinyproxy 1965 tinyproxy 0u CHR 136,8 915 /dev/pts/8 tinyproxy 1965 tinyproxy 1u CHR 136,8 915 /dev/pts/8 tinyproxy 1965 tinyproxy 2u CHR 136,8 915 /dev/pts/8 tinyproxy 1966 tinyproxy 0u CHR 136,8 915 /dev/pts/8 tinyproxy 1966 tinyproxy 1u CHR 136,8 915 /dev/pts/8 tinyproxy 1966 tinyproxy 2u CHR 136,8 915 /dev/pts/8 tinyproxy 1967 tinyproxy 0u CHR 136,8 915 /dev/pts/8 tinyproxy 1967 tinyproxy 1u CHR 136,8 915 /dev/pts/8 tinyproxy 1967 tinyproxy 2u CHR 136,8 915 /dev/pts/8 tinyproxy 1970 tinyproxy 0u CHR 136,8 915 /dev/pts/8 tinyproxy 1970 tinyproxy 1u CHR 136,8 915 /dev/pts/8 tinyproxy 1970 tinyproxy 2u CHR 136,8 915 /dev/pts/8 this is problem, when system is administrated over ssh ssh root@host /etc/init.d/tinyproxy start ant ssh connection doesn't close. another one issue is SAK. (Security Authentification Key) See linux source Reproducible: Always Steps to Reproduce:
odd ... src/daemon.c: void makedaemon(void) { <some code> #if 0 close(0); close(1); close(2); #endif }
i talked to the author and here's what he had to say: <email #1> The code originally closed those three descriptors, but when tinyproxy needed to report an error to the user (like being unable to write the current PID) it would crash since the descriptors were already closed. Those lines should be removed completely, and the closing of the descriptors should wait until tinyproxy has finished doing all the sanity checks. </email #1> however i talked to him some more and he said he'll look into moving the closing to another location and/or just logging to the logfile/syslog process ... so this bug will wait on an upstream fix
an upstream issue
i guess nothing i can do about it ... i could patch it, but i'd rather not change the behavior of upstream since they already know about the issue