ciao
come si avvia uno script python in background?
grazie
ciao
come si avvia uno script python in background?
grazie
bè credo come per qualsiasi altro programma, mettendo una & dopo il nome del programma. Per esempioOriginariamente inviato da matteolandi
ciao
come si avvia uno script python in background?
grazie
py programma.py &
"L'utopia è come l'orizzonte: cammino due passi, e si allontana di due passi. Cammino di dieci passi, e si allontana di dieci passi. E allora, a cosa serve l'utopia? A questo: serve per continuare a camminare."
Eduardo Galeano
Il mio sito
"if you want people to RTFM, make a better FM!"
ok però se lo eseguo via ssh, attraverso una finestra di terminale, il processo genitore è bash e quando chiudo il terminale viene terminato anche il mio script
Bella domanda interessa molto anche a me...
l' unica soluzione che avevo trovato era inserire il comando in qualche init.![]()
![]()
There are two kinds of researchers:
those that have implemented something and those that have not.
The latter will tell you that there are 142 ways of doing things
and that there isn't consensus on which is best.
The former will simply tell you that 141 of them don't work.
no, c'era un modo molto più semplice, era un comando da anteporre al comando, ma mica me lo ricordo...Originariamente inviato da claudiocrack
Bella domanda interessa molto anche a me...
l' unica soluzione che avevo trovato era inserire il comando in qualche init.![]()
![]()
"L'utopia è come l'orizzonte: cammino due passi, e si allontana di due passi. Cammino di dieci passi, e si allontana di dieci passi. E allora, a cosa serve l'utopia? A questo: serve per continuare a camminare."
Eduardo Galeano
Il mio sito
"if you want people to RTFM, make a better FM!"
Grandeeeesono anni che cerco questo comando pensavo non esistesse...
Grazie![]()
There are two kinds of researchers:
those that have implemented something and those that have not.
The latter will tell you that there are 142 ways of doing things
and that there isn't consensus on which is best.
The former will simply tell you that 141 of them don't work.
ovviamente con nohup si perde il controllo del processo e lo si può solo killare, per lanciare invece comandi in background e poi poter riprenderne il controllo si usa screen, molto utile per esempio quando si lavora su server remoti.
fw:/home/lalo# screen -h
Use: screen [-opts] [cmd [args]]
or: screen -r [host.tty]
Options:
-a Force all capabilities into each window's termcap.
-A -[r|R] Adapt all windows to the new display width & height.
-c file Read configuration file instead of '.screenrc'.
-d (-r) Detach the elsewhere running screen (and reattach here).
-dmS name Start as daemon: Screen session in detached mode.
-D (-r) Detach and logout remote (and reattach here).
-D -RR Do whatever is needed to get a screen session.
-e xy Change command characters.
-f Flow control on, -fn = off, -fa = auto.
-h lines Set the size of the scrollback history buffer.
-i Interrupt output sooner when flow control is on.
-l Login mode on (update /var/run/utmp), -ln = off.
-list or -ls. Do nothing, just list our SockDir.
-L Turn on output logging.
-m ignore $STY variable, do create a new screen session.
-O Choose optimal output rather than exact vt100 emulation.
-p window Preselect the named window if it exists.
-q Quiet startup. Exits with non-zero return code if unsuccessful.
-r Reattach to a detached screen process.
-R Reattach if possible, otherwise start a new session.
-s shell Shell to execute rather than $SHELL.
-S sockname Name this session <pid>.sockname instead of <pid>.<tty>.<host>.
-t title Set title. (window's name).
-T term Use term as $TERM for windows, rather than "screen".
-U Tell screen to use UTF-8 encoding.
-v Print "Screen version 4.00.03 (FAU) 23-Oct-06".
-wipe Do nothing, just clean up SockDir.
-x Attach to a not detached screen. (Multi display mode).
-X Execute <cmd> as a screen command in the specified session.
fw:/home/lalo#
parli di questo screen qui??![]()
There are two kinds of researchers:
those that have implemented something and those that have not.
The latter will tell you that there are 142 ways of doing things
and that there isn't consensus on which is best.
The former will simply tell you that 141 of them don't work.
certo, qualche link con howto in inglese:
http://www.amitu.com/blog/2004/12/screen-howto.html
http://www.kuro5hin.org/story/2004/3/9/16838/14935
http://jmcpherson.org/screen.html