Ciaran Johnston wrote:
> Hi folks, and a happy new year to you all.
>> Here's a tricky one, and apologies for the off-topic nature of the post:
> If I start a process from a shell which runs in the background, the
> standard output of that shell is tied to that terminal. In solaris, if I
> exit the shell, the background process keeps running, but loses it's tty
Are you sure it keeps running? Where does the output go to?
The behaviour under linux for background processes is to
be suspended if they output.
> (ps just shows a ? where once there was "pts/13" or whatever). Is there
> any way to reconnect a new terminal to this process, or otherwise get hold
> of the standard output?
Not on linux anyway.
> The linux approach appears to be that if the terminal dies so do the
> children, which is a good bit cleaner IMO.
Depends on the shell. You can control it explicitly with the nohup
command which makes the background process ignore the terminal HUP
signal, and also store the output to file. I prefer screen for
all this sort of messing though. Much more powerful:
http://www.pixelbeat.org/lkdb/screen.html
> I don't have a linux box here
> to back this up, though (still trying to get our IT department to stop
> locking me off the network every time they see a non windows box).
--
Pádraig Brady - http://www.pixelbeat.org
--- Following generated by rotagator ---
Turn off annoying beeps
readline: add "set bell-style none" to ~/.inputrc
X: xset b off
gnome-terminal: uncheck "Terminal bell" in profile's settings.
--
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!