Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

(screen) shell question

4 views
Skip to first unread message

Cesar da Silva

unread,
Mar 27, 1999, 3:00:00 AM3/27/99
to
Hi!
I'm having a little problem with the clients (Sun OS v2.06) at school.
ON some clients I'm able to run commands with nohup and they don't
stop after I log off. But on some client it just dies.

No to my question.
Is it possible to run a screen session from one of the clients that
allows me to run nohup commands to the clients that don't allow me, so
that the clients that don't allow me to run nohup command think that
I'm logged in?

If that is true, what is the screen options that I should use?

If the above is not possible with screen, then is there any other
command that would help me in my task?

Thanks,
Cesar da Silva

Matthias Buelow

unread,
Mar 28, 1999, 3:00:00 AM3/28/99
to
In article <36fd466c....@news1.telia.com>,

Cesar da Silva <cesar.d...@cyberdude.com> wrote:

>I'm having a little problem with the clients (Sun OS v2.06) at school.
>ON some clients I'm able to run commands with nohup and they don't
>stop after I log off. But on some client it just dies.

nohup is only required for sh/ksh; maybe your shell handles it
differently.
You usually can't run interactive programs in the background;
they'll be stopped when they try to read from the (nonexistent) tty
(if you nohup them, their output will usually go to nohup.out).

Because the UNIX terminal handling has always been rather limited in this
regard (I remember someone proposing a dup3 system call which takes
a pid as 3rd argument some time ago on the net which would probably
remedy this situation) it is not possible to reattach a backgrounded
process to a tty after logging out. This is why tools like screen(1)
exist.

>Is it possible to run a screen session from one of the clients that
>allows me to run nohup commands to the clients that don't allow me, so
>that the clients that don't allow me to run nohup command think that
>I'm logged in?

Yes.

>If that is true, what is the screen options that I should use?

The screen tool will not SIGHUP your programs since they'll continue
to run after screen has been detached. Therefore you need not use
nohup etc. in screen windows. Screen provides your programs with
pseudo-ttys and your programs will run in that environment, not
noticing that you have detached the entire thing.
To reattach to the running screen, type screen -r (read the screen
manual page in any case).


0 new messages