Problems with job control and tcsh

Problems with job control and tcsh

Post by Clifton Ko » Tue, 14 Sep 1993 13:28:51



  When I invoke tcsh from a serial login, I get the message:

Warning: no access to tty (Bad file number).
Thus no job control in this shell.

  I don't have a clue what this error is.  I'm using tcsh-6.04, which is the
latest and greates, as far as I know.  Anyone know how to fix this?

  Thanks,
  Cliff

--
-----------------------------------------------------------------------------
    Cliff Koch
    Motorola Cellular Infrastructure Division

 
 
 

Problems with job control and tcsh

Post by Frank Lofa » Wed, 15 Sep 1993 02:55:43



>  When I invoke tcsh from a serial login, I get the message:

>Warning: no access to tty (Bad file number).
>Thus no job control in this shell.

>  I don't have a clue what this error is.  I'm using tcsh-6.04, which is the
>latest and greates, as far as I know.  Anyone know how to fix this?

>  Thanks,
>  Cliff

        It means tcsh doesn't have a controlling tty, so it can't do the
operations it needs to do to implement job control. That seems to happen if
you use a /dev/cua? line for logins instead of a /dev/ttyS? line. To fix it,
make getty spawn on the call-in device (/dev/ttyS?), not the call-out device
(/dev/cua?). E.g. if you run getty on /dev/cua1, run it on /dev/ttyS1 instead.
I hope this helps.

 
 
 

1. POSIX job control (was Re: Problems with tcsh 6.00 and SCO Unix)


This sounds like The Return of the POSIX Job Control Monster.

The POSIX setpgid() call refuses to allow a process to join a process
group that lacks a living process group leader.  I'll bet that the
internal command -- which, as the first command in the pipeline, is
the process group leader -- is running and exiting before the other
command(s) in the pipeline can be spawned and join its process group.

I know about this problem because Bash used to have it.  Current Bash
versions include a rather hackish workaround of my invention involving
pipe(), read() and close().  It ensures that a pipeline's process
group leader continues to exist while its other processes are spawned.

Not only is this solution ugly; it fails on SCO UNIX.  When the
process group leader dies and the pipeline is backgrounded, the
pipeline cannot be restarted, because it is impossible to give the tty
to a process group that lacks a living process group leader.  The
documentation as well as tests with AIX 3.1 demonstrate that this is a
genuine SCO bug and not a POSIX botch.

I think a better fix would make the *last* process in the pipeline be
the process group leader.  This change would fix the internal command
pipeline bug.  It would also make sense, since the last process in a
pipeline is typically the last one to die.
--

 "You can make use of the fact that UDP does not provide `reliable and
  efficient streams' to eliminate the state, but then you are unreliable
  and inefficent.  There Ain't No Such Thing As A Free Lunch." -- Chris Torek

2. Netsite Commerce: Customized Index?

3. tcsh job control

4. ENOBUFS from a TCP socket

5. job control in tcsh on Solaris 2.5

6. DLT autoloader and ARCserveIT 6.6.1

7. TCSH: "No job control in this shell"

8. Problem with GnuPG and KMail after RH7.1 to RH7.2 upgrade

9. broken job control with bash and tcsh

10. tcsh 6.04, no job control

11. Can't get job control in Emacs w/ tcsh or bash

12. fg / bg / job control / tcsh

13. JOB CONTROL FOR JOBS w/o a TTY (using BASH)?