msh stdin, fcntl nonblock on stdin by child of child

Denys Vlasenko vda.linux at googlemail.com
Wed Feb 20 20:46:00 UTC 2008


On Wednesday 20 February 2008 20:48, Denys Vlasenko wrote:
> On Wednesday 20 February 2008 17:39, Jate Sujjavanich wrote:
> > I run a script in the background which starts dropbear client. Dropbear
> > sets stdin to non-blocking. This causes my msh shell in the foreground
> > to print infinite prompts because lineedit is expecting a blocking read
> > (in safe_read).
> > 
> > msh -> sh spawn_dbclient & -> dbclient args
> > 
> > Should dbclient's fcntl be affecting msh's stdin?
> 
> Yes. This is a design bug in UNIX API.
>...

As to practical solution for you: use

dbclient args </dev/null
--
vda



More information about the busybox mailing list