It is currently Thu, 24 Apr 2014 15:44:04 GMT



 
Author Message
 Job Control in ksh

Hello. I have been having a very annoying problem with ksh88 under
Solaris. Every so often, when I enter a foreground command, the job control
mechanism registers the command as a job. This happens especially with long
pipelines. After the command is done, the job still exists, and can't be killed
since the process doesn't exist any more. The worst part of this is that
whenever there are any actual background jobs running and this happens, the
shell freezes until all background jobs have exited. Has anyone even seen this
happen before? What is causing this to happen, and how can I avoid it?

By the way, here is the output from "uname -a":

        SunOS <host> 5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-2

Here is the ksh version information:

        Version M-11/16/88i

Thank you for any help you can give me.

                                                - Lyle Goldman



 Sun, 28 Sep 2003 12:12:18 GMT   
 Job Control in ksh
In article <3AD3D9A2.3020...@erols.com>,

Are you typing the commands all in one line?  It's conceivable you are
surpassing the maximum canonical length for the tty in which case the
command is truncated.  That can lead to some unexpected results.
Remember,  you can hit enter after any "|", "||" or "&&" and the
command will continue on the next line (and the canonical limit is reset)
or you can continue lines with a "\".

--
Dan Mercer
damer...@mmm.com

Opinions expressed herein are my own and may not represent those of my employer.



 Mon, 29 Sep 2003 00:29:47 GMT   
 Job Control in ksh
 >

        Yes, I usually do type the commands all on one line. However, this also
happens with very short commands (although some are actually aliases for longer
commands, but that has nothing to do with the terminal), so I don't think that's
the problem. The commands are executing correctly; the shell just puts it in its
job list. When I do a "jobs -l" command, the command is listed exactly as I
typed it, and I can't get rid of it.

        Any other ideas?

                                                - Lyle Goldman



 Mon, 29 Sep 2003 12:46:49 GMT   
 Job Control in ksh

Any particular reason you're using ksh88? Have you tried a different shell,
like ksh93 or bash or something similar? Could be a bug in ksh88. Could be a
bad keyboard tacking on an & at the end of the command line...



 Mon, 29 Sep 2003 21:26:36 GMT   
 Job Control in ksh
 >

        I'm using ksh88 because that is what they have on that particular
computer. They don't have ksh93 or even bash. I have no control over what they
use. If I did, I would want to use zsh! I think one of the reasons why they
stick with ksh88 is because it is the only shell that allows exported aliases.
It's too bad the other shells don't have that capability; it's a very useful
feature.

        I don't think it's the keyboard. When I do put an & at the end, the
command terminates normally and the shell doesn't freeze. I'll bet it is a bug
in ksh88, but I seem to be the only one who sees it.

                                                - Lyle Goldman



 Tue, 30 Sep 2003 11:15:43 GMT   
 Job Control in ksh
In article <3AD66F5F.6040...@erols.com>,

Only in scripts that do not begin with a hashbang,  i.e. "#!/bin/ksh".

Are the commands that you see this behavior programs or shell scripts.
If shell scripts,  do you have ENV set?  It's probable the problem lies in
your ENV file.

--
Dan Mercer
damer...@mmm.com

Opinions expressed herein are my own and may not represent those of my employer.



 Fri, 03 Oct 2003 22:05:51 GMT   
 Job Control in ksh
Hi,

lookout for some traps set. hit

# trap

to see if any are set. trap is a built in command.
To delet traps just hit

# trap 1 2 3 4 5 6 ...

where 1 2 3 ... are the signals which are traped.

SaKe

Lyle Goldman schrieb in Nachricht <3AD3D9A2.3020...@erols.com>...



 Sun, 09 Nov 2003 03:38:05 GMT   
 
   [ 7 post ] 

Similar Threads

1. Turning off Job Control in ksh

2. job control in ksh to be like in csh ?

3. ksh job control: ^C, ^\

4. solaris 2.3 ksh pipeline/job control bug

5. Ksh job control question

6. solaris ksh messes up terminal setting after job control

7. ksh job control from a script - problem (long)

8. A Ksh Job Control question

9. ksh: job control question...

10. ksh: how to exit ksh parent with jobs running in background


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software