idle (or inactivity) timeout in ash

rouble r.ouble at gmail.com
Sat Feb 5 00:17:05 UTC 2011


Hi Denys,

You are right. In my case the shell does not exit. I see the message,
which triggers me to press Enter, and that exits the shell.

Thinking out loud here, is it not possible to write "\n" to the input
stream of readtoken from the alarm handler (after setting timed_out to
true)?

Cheers
Rouble

On Fri, Feb 4, 2011 at 5:06 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> On Friday 04 February 2011 22:41, rouble wrote:
>> Here is my LOG:
>> <SNIP>
>> 21:40:12.997206 --- SIGALRM (Alarm clock) @ 0 (0) ---
>> 21:40:12.997447 fstat64(2, {st_mode=S_IFCHR|0600, st_rdev=makedev(136,
>> 0), ...}) = 0
>> 21:40:12.998248 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
>> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb779f000
>> 21:40:12.998680 _llseek(2, 0, 0xbf9acf58, SEEK_CUR) = -1 ESPIPE (Illegal seek)
>> 21:40:12.999121 write(2, "\7timed out waiting for input:
>> auto-logout\n", 42) = 42
>> 21:40:12.999678 munmap(0xb779f000, 4096) = 0
>> 21:40:13.000131 sigreturn()             = ? (mask now [])
>> 21:40:13.000627 poll(
>>
>> And this is what the screen output looks like, note I have not pressed
>> enter here:
>> # TMOUT=3 strace -tt -s99 -oLOG ash
>> /system/etc # timed out waiting for input: auto-logout
>
> You see the message because you still emit message from signal handler.
>
> This is just a fragment of LOG. It does not show what happened after poll.
> Did hell exit? If so, why?
>
>> >> Without pressing the enter key.
>> >
>> > Can you send your .config and LOG?
>
> Please send .config too.
>
> --
> vda
>


More information about the busybox mailing list