Schrift
[thread]9792[/thread]

SSH-Verbindung trennen - Perl-Script weiterlaufen (Seite 2)

Leser: 1


<< |< 1 2 >| >> 12 Einträge, 2 Seiten
bloonix
 2006-05-08 15:45
#95647 #95647
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
[quote=nepos,08.05.2006, 13:25]Also, wenn ich mich mit SSH vorher einlogge, quasi ne Login-Shell habe und den Befehl dann ausfuehre und nen Logout mache, wartet die Shell, bis der Sleep fertig ist.[/quote]
Natürlich wartet dann die Shell.

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
rh165745@lxipr904:~> ssh -l oracle lxzpr001
Last login: Mon May  8 13:37:57 2006 from 172.19.8.182
lxzpr001:mydb:/ora
#echo $$
19621
lxzpr001:mydb:/ora
#sleep 100 1>/dev/null 2>/dev/null &
[1] 19656
lxzpr001:mydb:/ora
#ps -ef|grep sleep
oracle   19656 19621  0 13:41 pts/11   00:00:00 sleep 100
oracle   19658 19621  0 13:41 pts/11   00:00:00 grep sleep
lxzpr001:mydb:/ora
#exit
logout


Wenn du dich ganz normal einloggst und einen Prozess mit
Umleitung der Ausgabekanäle startest, dann bleibt deine Login-
Session der Vaterprozess, in diesem Fall 19621.

Dann kann die Session erst beendet werden, wenn der sleep
Prozess beendet wird. In meinem Beispiel im anderen Thread
wird init(1) der Vaterprozess und nicht die Login-Shell.\n\n

<!--EDIT|opi|1147089245-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.
bloonix
 2006-05-08 16:02
#95648 #95648
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
[quote=Teutales,08.05.2006, 13:04]OK, habs bis jetzt auch nur mit PuTTY probiert...[/quote]
Das hat mit Putty nichts zu tun. Putty ist nur eine Software
und verwendet die Protokolle SSH, Telnet, Rlogin oder was auch
immer. Du befindest dich dann tatsächlich in einer Shell - meistens
ist es eine Shell - auf dieser Maschine und startest auch deine
Remote oder Secure Shell von dieser Maschine aus.\n\n

<!--EDIT|opi|1147121691-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.
<< |< 1 2 >| >> 12 Einträge, 2 Seiten



View all threads created 2006-05-08 12:12.