Operating System - HP-UX
1833372 Members
3178 Online
110052 Solutions
New Discussion

& symble is not working as running back ground process

 
SOLVED
Go to solution
Tammy Liang
Regular Advisor

& symble is not working as running back ground process

I can not run process in back ground mode via &.

Help please...
take easy, enjoy life
14 REPLIES 14
Mark Greene_1
Honored Contributor

Re: & symble is not working as running back ground process

What shell are you using? What version of HP-UX? What command? Have you tried the command in the forground to verify it doesn't have errors and how long it runs? Have you tried something that you know is going to run for a while?

mark
the future will be a lot like now, only later
Tammy Liang
Regular Advisor

Re: & symble is not working as running back ground process

/sbin/sh
OS 10.20
I am running as "ll &"..

It is working on the other systems, but not on this particualr system...
take easy, enjoy life
Patrick Wallek
Honored Contributor
Solution

Re: & symble is not working as running back ground process

What happens when you try it? An error messages?
Tammy Liang
Regular Advisor

Re: & symble is not working as running back ground process

no, just display the contents of the directory on the screen when I run "ll &".
take easy, enjoy life
Sundar_7
Honored Contributor

Re: & symble is not working as running back ground process

ll & just display the contents of the directory ? - well, what else do you expect to see ? :-).

Even though the job starts in the background, the job sends the stdout and stderr to the terminal from which it is started.

Now I am curious, what do you mean when you say it is working in other systems ?
Learn What to do ,How to do and more importantly When to do ?
Mark Greene_1
Honored Contributor

Re: & symble is not working as running back ground process

what do you get when you run this:

ll ; echo $? & echo $?
the future will be a lot like now, only later
Patrick Wallek
Honored Contributor

Re: & symble is not working as running back ground process

I have to agree with Sundar.

An 'll &' will STILL send its output to standard out, which is your terminal.

If you don't want to see anything you would do:

# ll > afile &
(redirect std out to a file)

or you could do

# ll > afile 2>&1 &
(Redireciret stderr to stdout and stdout to afile)

What exactly are you trying to accomplish here?
RAC_1
Honored Contributor

Re: & symble is not working as running back ground process

You must hae cheked this. Is there something in that dir???

Anil
There is no substitute to HARDWORK
Tammy Liang
Regular Advisor

Re: & symble is not working as running back ground process

I am posting the result that I have at two different systems with same command " ll &"

aktsds23 / # ll &
[1] 29913
aktsds23 / #

tcl3_APPMGR /users/me> ll &
[1] 24949
tcl3_APPMGR /users/me> total 11282
-rw-rw-r-- 1 t410e59 users 0 Apr 29 10:44 1
-rw-rw-r-- 1 t410e59 users 0 Apr 29 10:42 2
drwx------ 2 root sys 24 Sep 28 1994 Mail

take easy, enjoy life
Tom Smith_9
Frequent Advisor

Re: & symble is not working as running back ground process

Hi Tammy,
What is the output of running "ll" without the "&" on the system in question?

Also, have you checked to see someone created an alias for "ll"?

Mark Greene_1
Honored Contributor

Re: & symble is not working as running back ground process

On the problem server run the "jobs" command to see if the job is still running in the background and hung. A control-Z should bring the job into the forground. If you do "who -u" there should be a tty assignment for your login ID. If not, this will hang some processes that have to interact with stdout.

the future will be a lot like now, only later
Tammy Liang
Regular Advisor

Re: & symble is not working as running back ground process

Thanks all for replying my questions.
I take Patrick's suggestion to redirect my std and stderr to a file and run as back groud process. Still not sure why I have two different out put with the same command on these two systems.
take easy, enjoy life
Govind_3
Regular Advisor

Re: & symble is not working as running back ground process

May be your "ll" is aliased to something else like "ls -l" and thats the reason ll& is giving the output of "ls -l" try \ll& then you would use the unaliased version.
you could check to see which ll it would show if you are using the one u wnated or not!
-Cheers
Mike Stroyan
Honored Contributor

Re: & symble is not working as running back ground process

stty tostop
will cause a background process to wait when it tries to write to the terminal.

stty -tostop
will allow a background process to write to the terminal, (but not read from it.)

You can check which setting you have by running
stty -a