ott 132010
Come mi hanno fatto notare in uno dei commenti di un precedente articolo (nohup, bg e disown), mi sono scordato del comando setsid, parlando delle possibilità di “staccare” un processo da una determinata shell.
man setsid
setsid - run a program in a new session
La maggiore differenza che vedo con il comando nohup è che con setsid si perde tutto ciò che sarebbe loggato a standard output, ma per alcuni programmi questo pùo essere normale o accettabile.
Uso base:
Lancia il comando ~/src/compile.all su una macchina remota:
ssh your.remote-box.com
setsid ~/src/compile.all
logoff (or < ctrl > D)
E’ anche possibile passare parametri a setsid
setsid /usr/bin/totem '/path/to/my/file.avi'
Popular Posts:
- (English) What are the desktop environments that use less resources on Linux ?
- Come proteggere Apache con Fail2ban
- Nightingale un bellissimo riproduttore audio per Linux
- Livarp – Una distribuzione Linux molto leggera
- Come mai i server basati su Linux sono Affidabili ?
Find me on Google+

hi:
my demo:
setsid mysql -uroot -pxxx
it’s runing ok,but how can i return mysql shell ‘>’,
please help
Hello,
With setsid you “fire and forget” a process.
To access mysql prompt you can connect to it via a mysqlclient.
Or do you want to do something different ?
Check also the commands & e fg.