home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15408 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  2.0 KB

  1. Xref: sparky comp.unix.questions:15408 comp.unix.pc-clone.32bit:1012
  2. Path: sparky!uunet!usc!news.service.uci.edu!cerritos.edu!swc!wndrsvr!andyb
  3. Newsgroups: comp.unix.questions,comp.unix.pc-clone.32bit
  4. Subject: can't open /dev/tty
  5. Message-ID: <C0oHB8.3o6@wndrsvr.la.ca.us>
  6. From: andyb@wndrsvr.la.ca.us (Andy Brager)
  7. Date: Mon, 11 Jan 1993 07:11:31 GMT
  8. Organization: Wonder Server - Public Access for SoCal
  9. Lines: 42
  10.  
  11.  
  12. ISC V3 3.0
  13.  
  14. I have written a program to do a chroot(2), and then exec
  15. a program passed to it as an argument.   If I pass it "csh"
  16. as the argument, it does indeed exec a csh, but I get the 
  17. error message:
  18. "Warning: no access to tty; thus no job control in this shell..."
  19.  
  20. If I pass it rn or trn as the argument, I get: "Can't open /dev/tty" 
  21. and it exits.
  22.  
  23. Well, the obvious answer is that my chroot'ed environment is
  24. incomplete.   This is what's in /dev there.  
  25.  
  26. total 4
  27. drwxrwxr-x   2 root     sys           96 Jan  7 22:46 ./
  28. drwxr-xr-x  11 bbs      other        192 Jan  7 23:29 ../
  29. crw-rw-rw-   1 root     other      2,  2 Jan  6 00:46 null
  30. crw-rw-rw-   1 root     other     16,  0 Dec 19 12:31 tty
  31. crw-r--r--   1 root     other      5,128 Jan  7 22:44 vt04
  32.  
  33.  
  34. I don't see the problem.  Do you?   Any other ideas?
  35. (vt04 is where I run this program from.  I doubt it's necessary, 
  36. but I was grasping at straws. )
  37.  
  38. Another interesting thing that I just discovered is if I try
  39. to do "echo x > /dev/tty" (in the chroot'ed csh environment of course)
  40. I get "tty: no such device or address".  If the permissions are changed
  41. to 644, then I get "permission denied".  ("echo x > /dev/null" works
  42. just fine).  This is probably something really simple and really obscure.  
  43. Anyone?
  44.  
  45. Thanks in advance! 
  46.  
  47. -  Andy
  48. -- 
  49.            DO NOT BUY TOUCHE COMPUTERS -email for details
  50.      Large Packages (10K+ Total) to: cerritos.edu!swc!wndrsvr!andyb
  51.    -I don't know but I been told; two sides to every story - Joe Walsh
  52. [    This Space For Rent - No children, pets, or toxic waste dumps please.     ]
  53.