Why won't scripts run in the background?

Steven V. Christensen schriste at uceng.UC.EDU
Tue Apr 10 12:47:47 AEST 1990


880139h at aucs.uucp (Rob Hu10) writes:


>This has been bugging me for just about too long.  I've even asked 
>all the local smart fellers and none of them have any ideas.  So,
>I post my question:

>WHY WON'T ANY @$#%$!!! SHELL SCRIPTS RUN IN THE BACKGROUND SUCCESFULLY
>ON MY ACCOUNT WHEN THE _SAME_ SCRIPTS RUN JUST DANDY IN OTHER FOLK'S
>ACCOUNTS????!!!!!

>If I set up a script to run in the background, eg. scriptname &,
>it runs just fine until I type a command or just <return>.  The error
>message I get is :

>[1] +Stopped  (tty output)  scriptname

You need to have in your .login file the following command:

	stty -tostop

This tells the system not to stop background programs when they try
to write to the stdout.

see also: man stty


		Steven
-- 
Steven V. Christensen
U.C. College of Eng.
schriste at uceng.uc.edu



More information about the Comp.unix.questions mailing list