hi I found a weird behavior trying to use timeout(1) in a script with interactive commands. My use case is to ask for unlocking /home from /etc/rc.local but continue if I don't type it in time.
this is working: timeout 2s less /etc/fstab the same command isn't working from a script, running it get stuck and can't be stopped with ctrl+C #!/bin/sh timeout 2s less /etc/fstab However, using timeout with a non interactive command in a script doesn't create troubles in the issue case, a ktrace gives the following last lines, but I don't know how to interpret them 21097 timeout PSIG SIGCHLD caught handler=0xb1d715d6b00 mask=0x86007<SIGHUP|SIGINT|SIGQUIT|SIGALRM|SIGTERM|SIGCHLD> 21097 timeout RET sigsuspend -1 errno 4 Interrupted system call 21097 timeout CALL sigreturn(0x7f7ffffe3540) 21097 timeout RET sigreturn JUSTRETURN 21097 timeout CALL kbind(0x7f7ffffe3868,24,0xd30add790970a7bd) 21097 timeout RET kbind 0 21097 timeout CALL wait4(WAIT_ANY,0x7f7ffffe39f4,0<>,0)