Background & is considered as Idle


 
Thread Tools Search this Thread
Operating Systems AIX Background & is considered as Idle
# 8  
Old 11-19-2010
I try this
xedit &
then process number shows on terminal. I can type any command through terminal. Process will die in 30 minutes.

I try this
xedit &
since this is foreground process so I can't use this terminal to do anything.
This terminal never die or close.

When I try
nohup xedit &

this is very similiar to xedit. I can't use this terminal.

My question?

nohup xedit & == xedit

at least from what I see on screen, they are very similar.

I feel & is not set up right, but I don't know what cuases this issue?

Thank you.
# 9  
Old 11-19-2010
Quote:
Originally Posted by david_hu_66
I feel & is not set up right
That's not how it works. & is not a thing to "set up". As explained before, things get killed when your terminal closes when they still have references to the terminal.
Quote:
I try this
xedit &
then process number shows on terminal. I can type any command through terminal. Process will die in 30 minutes.
yes, because your terminal's been idle for 30 minutes and closes. Or does it not close your terminal too?

Quote:
I try this
xedit &
since this is foreground process so I can't use this terminal to do anything.
This terminal never die or close.
Was that a typo? 'xedit &' is not a foreground process.

Quote:
When I try
nohup xedit &

this is very similiar to xedit. I can't use this terminal.
Are you sure you typed 'nohup xedit &' and not just 'nohup xedit'? And you didn't use the disown command we suggested either.
Quote:
My question?

nohup xedit & == xedit

at least from what I see on screen, they are very similar.
& means 'put this in the background'.

If nohup doesn't want to work, try this:

Code:
xedit < /dev/null > /dev/null 2> /dev/null & disown

That's more or less what I was trying to do with nohup, but done the hard way. This should run in background and not close when the terminal does.
# 10  
Old 11-19-2010
Question

Can you explain again what does this mean "open handles to the terminal"?

We have several aix unix servers.

Why xedit &
works ok in other unix server and never die (close)?


Thank you.
# 11  
Old 11-20-2010
Quote:
Originally Posted by david_hu_66
Can you explain again what does this mean "open handles to the terminal"?
When you run an application from a terminal, it gets copies of whatever files it has open. In this case, stdin, which reads from your terminal window; stdout, which writes to your terminal window; and stderr, which also writes to your terminal window. When the terminal closes, anything that still has these open dies.

By closing these, since xedit doesn't need them anyway, you prevent it from being killed.
Quote:
We have several aix unix servers.
Why xedit &
works ok in other unix server and never die (close)?
Probably because those terminals aren't set to time out.

If turning off your terminal's timeout is what you want to do now, you might be able to by running TMOUT=0, if your administrator hasn't disabled this.
# 12  
Old 11-21-2010
try this
Code:
echo $TMOUT
unset TMOUT


Last edited by frank_rizzo; 11-21-2010 at 06:51 PM.. Reason: add comment
# 13  
Old 11-22-2010
Quote:
Originally Posted by frank_rizzo
Code:
echo $TMOUT
unset TMOUT

This is what came to my mind first too. If a variable "TMOUT" is set to some integer value the system will log off idle sessions automatically after this many seconds of inactivity. If the terminal closes all the processes started via this terminal are being closed too and probably this is what has happened with xedit.

You might want to include these lines in your "~/.kshrc" file.

I hoep this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Time command issuing all zeroes (is now considered homework help)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A common problem arising in games and simulations is to generate a random arrangements of integers from 1 to N.... (5 Replies)
Discussion started by: lamentofking
5 Replies

2. Programming

Why is C/C++ considered low-level languages???

Hi friends, I hope everyone is doing well and fine. I have always been hearing that C/C++ are relatively low-level as compared to Java/C# etc. Could you please tell me some low-level qualities of C/C++? And I think disk deframenters are written in C/C++, please correct me if I am wrong. And please... (5 Replies)
Discussion started by: gabam
5 Replies

3. Programming

Background (nohup * &) SSH command block possible?

Hello, I am trying to find a way to send several sequential commands via SSH to a remote box in a single command. Thoughts so far: 1) Can I put them into a function and call the function within the ssh command? e.g. ssh <targetserver> $(functionx) No - then it calls the function in... (4 Replies)
Discussion started by: doonan_79
4 Replies

4. Shell Programming and Scripting

Write a scripts to kill idle user for 60 min. & email user list to admin in text file

Folks, I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3) List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Discussion started by: sumit30
4 Replies

5. Shell Programming and Scripting

Csh Programming Considered Harmful

I have noticed a few posts asking questions about c shell scripting these past few days. This a good read for those that currently or are thinking about writing a csh script: Csh Programming Considered Harmful (9 Replies)
Discussion started by: ilikecows
9 Replies

6. Programming

C: why decimals considered double by default ?

Can anybody tell me why any literal constant real numbers are double by default in C ? Why is the default not float ? (2 Replies)
Discussion started by: limmer
2 Replies

7. Solaris

Handling Stdout&StdErr for background jobs.

Hello Friends, sorry, i am not very familiar with Unix programming. Could you please help me on this? We have to start different components from a startup script. each components are started as below in the background in a startprocess function $nohup $file $args >>$logFile 2>&1 & ... (1 Reply)
Discussion started by: alvinbush
1 Replies

8. Shell Programming and Scripting

Handling Stdout&StdErr for background jobs.

Hello Friends, sorry, i am not very familiar with Unix programming. Could you please help me on this? We have to start different components from a startup script. each components are started as below in the background in a startprocess function $nohup $file $args >>$logFile 2>&1 & ... (0 Replies)
Discussion started by: alvinbush
0 Replies

9. UNIX for Dummies Questions & Answers

alias for running in background &

Hi all, I am kinda new to this unix environment, and now I get confused to figure out this alias problem. I would like to make my xemacs to run in background every call, and I am trying to do it this way in .bashrc alias e='xemacs &* & ' i also tried e () { xemacs "&*" &} but they are... (0 Replies)
Discussion started by: hfireflyu
0 Replies

10. UNIX for Dummies Questions & Answers

subshell & background function

Hello all, Can someone explain to me the advantage between using subshell over a function call in scripts? To me these are the same. Am I wrong to think this? (4 Replies)
Discussion started by: larry
4 Replies
Login or Register to Ask a Question