Open GoogleCodeExporter opened 9 years ago
I seem to be seeing these same issues
Original comment by georgemo...@gmail.com
on 8 Jan 2011 at 5:53
I get these problems too. When I attach a screen session, and close the
browser, and attach the screen on a separate machine, the screen session has
been redrawn for the kindle's size, and doesn't redraw!
Original comment by tams...@gmail.com
on 9 Jan 2011 at 9:51
i'm using this script to clean up resources after shellinabox:
#!/bin/bash
sbd=`pidof shellinaboxd | awk {'print $1'}`
ps --ppid $sbd -o pid,pgid | grep -v PID | while read p pgid; do
if readlink /proc/$p/fd/0 | grep deleted; then
kill -9 -$pgid
fi
done
put the above in your cron every 5 minuetes or so. it exploits the fact that
closed browser tabs will eventually turn into processes without controlling tty.
finally, dont forget to set some sane process count limit and drop root privs,
like:
#!/bin/bash
ulimit -u 64
exec su nobody -c 'shellinaboxd -s /login:SSH'
using it like this its somewhat possible to keep it as public service (not
running as root and restricting process resources)
Original comment by karel.t...@gmail.com
on 7 Aug 2011 at 2:03
>> it exploits the fact that closed browser tabs will eventually turn into
processes without controlling tty.
not on my system (centos). Processes are connected to tty (pts/x) even after
many hours. So this method does not work for me.
Original comment by krz...@gmail.com
on 7 Aug 2011 at 1:31
This deserves some investigation. The child processes ought to be terminated
when the socket closes.
Original comment by beewoo...@gmail.com
on 31 Mar 2012 at 10:17
For future readers :)
I have made a patch for fixing this issue directly in shellinaboxd.
I think it works fine. At least for what i have tested ...
Description:
If session timeouts cleanup procedure is triggered. Procedure is executed
in launcher process, because this is parent of child (service) process.
There we can check, if we have correct child pid (stored in session) and
than we can terminate process.
Github: https://github.com/anilgulecha/shellinabox/pull/4
Original comment by luka.kra...@gmail.com
on 14 Jan 2015 at 3:41
Attachments:
[deleted comment]
[deleted comment]
Ok, I was wrong and above patch doesn't work in all cases. Please see commit
message below.
There is also new fork with integrated patch on Github:
https://github.com/shellinabox/shellinabox
Message
--------
...
This fix works only if shellinaboxd is started without root privileges.
Droping them at runtime doesn't help either. Issue is related to PAM
session management process.
If we start shellinaboxd with root priviliges this fix will not affect
anything.
...
Original comment by luka.kra...@gmail.com
on 6 Mar 2015 at 1:03
Attachments:
Original issue reported on code.google.com by
krz...@gmail.com
on 10 Dec 2010 at 2:39