[MAYBE SOLVED] was Can't resolv "sh: can't access tty; job control turned off"

Luciano Miguel Ferreira Rocha strange at nsk.no-ip.org
Wed Jan 17 13:50:32 PST 2007


On Wed, Jan 17, 2007 at 09:26:10PM +0100, Laurent B wrote:
> rm /dev/tty
> ln -s /dev/pts/0 /dev/tty

That's wrong. I hope you don't use more than one login at the same time,
as those will get pts/1, pts/2, etc., but /dev/tty will point to the
wrong one.

> And now it's working, so I don't know what /dev/tty is used for, but seems 
> to be a dynamic link which stands for the current console tou are logged in.

tty stands for the processe's controlling terminal. It isn't a symbolic
link, on Linux it is a char device, major 5, minor 0.

> So now why /dev/tty does not work ? I think it is a kernel compilation 
> problem, will look for this , but if you have an answer, I'm taking it :)

Because the shell really doesn't have a controlling terminal. Eg:

$ ssh server 'echo hello > /dev/tty'
bash: /dev/tty: No such device or address
$ ssh server -t 'echo hello > /dev/tty'
hello

(The -t option to ssh forces pseudo-tty allocation.)

My uneducated guess would be with the pseudo-tty allocation in busybox's
inetd, or an inconsistency between the supported methos by the kernel
and busybox (Unix98 pts vs legacy BSD).

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070117/b08be297/attachment.pgp 


More information about the busybox mailing list