DuckCorp Projects: Issueshttps://projects.duckcorp.org/https://projects.duckcorp.org/favicon.ico?16699090422011-03-20T20:55:26ZDuckCorp Projects
Redmine Bip - Enhancement #210 (Rejected): shell supporthttps://projects.duckcorp.org/issues/2102011-03-20T20:55:26ZVladislav Grishenkothemiron@mail.ru
<p>it'll be great to have ability to execute shell commands via irc private messaging.<br />simple case (admin, one shell command, no execution timeout, blocking wait for the results) implemented, see patch attached.</p>
<p>Example of usage:<br /> /bip shell uname -a<br /> Linux rt-n16 2.6.22.19 <a class="issue tracker-2 status-1 priority-4 priority-default" title="Enhancement: Création d'une nouvelle page d'affichage (New)" href="https://projects.duckcorp.org/issues/8">#8</a> Sat Mar 19 21:53:29 YEKT 2011 mips GNU/Linux</p>
<p>the more better solution would be like following:<br />1. open one non-blocking shell pipe (or pseudo tty) per client connection with /bip shell [optional cmd]<br />2. poll shell output descriptor together with connection handles<br />3. notify client if any output is available<br />4. pass subsequent commands directly to the opened shell, if it's not closed yet <br />5. close shell pipe on timeout and/or with /bip shell exit (semantic would allow *sh exist as well and pipe will be closed)</p> Bip - Bug #209 (New): No connection attempt after date/time shifthttps://projects.duckcorp.org/issues/2092011-03-20T20:30:38ZVladislav Grishenkothemiron@mail.ru
<p>in my case, bip doesn't even try to establish connections, if started on my soho router which has not rtc available.<br />after syncing the time, it shifts too much within select call, (re)connection msec timeout overflows and gets unexpected high values.</p>
<p>debug log:<br />01-01-1970 05:00:17 I've seen socket 0 !<br />01-01-1970 05:00:17 Test read on fd 0 1:1<br />01-01-1970 05:00:17 msec: 1000, sec: 1, usec: 0<br />19-03-2011 23:59:22 msec: 813946583, sec: 0, usec: 0<br />19-03-2011 23:59:22 Select timed-out. irc.o timer !<br />19-03-2011 23:59:22 I've seen socket 0 !<br />19-03-2011 23:59:22 Test read on fd 0 1:1<br />19-03-2011 23:59:22 msec: 813946583, sec: 813946, usec: 583000<br />20-03-2011 00:00:32 msec: 813875835, sec: 813876, usec: 8000</p>
<p>suggested patch performs timeout range check and fixes the issue</p>