Looks like the manual is a little misleading.
Change:
When the shell is invoked as jsh, Job Control is enabled in
addition to all of the functionality described previously
for sh. Typically Job Control is enabled for the interac-
tive shell only. Non-interactive shells typically do not
benefit from the added functionality of Job Control.
to:
When the shell is invoked as jsh, Job Control is enabled in
addition to all of the functionality described previously
for sh. Job Control is enabled for the interac-
tive shell only. Non-interactive shells do not
benefit from the added functionality of Job Control.
(Remove the word typically)
Solution: use ksh
Thanx to:
Hill.Michael@tci.com
jsdy@tux.org
Glenn.Satchell@uniq.com.au
Kevin.Sheehan@uniq.com.au
> -----Original Message-----
> From: Paquette, Trevor
> Sent: Tuesday, November 25, 1997 2:11 PM
> To: 'sun-managers@ra.mcs.anl.gov'
> Subject: job control problem using jsh
>
> By the manual the following script should work.. but alas does not.
>
> > #!/usr/bin/jsh
> >
> > sleep 10 &
> > jobs -p
> >
> > The above script returns the following:
> >
> > ./t: jobs: no job control
> >
> >
> > Running jsh interactively works as expected:
> >
> > sol# /usr/bin/jsh
> > # sleep 10 &
> > [1] 3655
> > # jobs -p
> > 3655
> >
> >
> > The manual for jsh (available under man sh) states:
> >
> > When the shell is invoked as jsh, Job Control is enabled in
> > addition to all of the functionality described previously
> > for sh. Typically Job Control is enabled for the interac-
> > tive shell only. Non-interactive shells typically do not
> > benefit from the added functionality of Job Control.
> >
> > Note it does NOT say that it is NOT available for non-interactive
> > shells..
> >
> > Any ideas?
> >
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:10 CDT