how to make newlisp app run in background

Started by csfreebird, November 26, 2013, 03:20:44 PM

Previous topic - Next topic

csfreebird

Hi, I ssh remote server, run my newlisp app in terminal with operator &, then I close my terminal window.

but after about 2 hours, all newlisp processes are terminated. Why? I run below command in terminal:

./test.lsp 192.168.1.57 7777 131031000043 131031000143 &


in test.lsp, I launch 100 processes like this:

;; create and run signs one by one                                                                                                            
(let ((a (int sign-from 0 10)) (b (int sign-to 0 10)))
  (println a)
  (println b)
  (until (= a b)
         (begin
          (spawn 'm (create-sign server (int port) (int-to-address a)))
          (++ a)
          (println "a:" a)
          ))
  (until (sync 2000) (print ".")))

csfreebird

#1
maybe nohup command can do this. I am trying:

nohup ./test.lsp 192.168.1.57 7777 131031000043 131031000143 > /dev/null 2>&1 &

csfreebird

#2
It works.

rickyboy

#3
Glad it worked out!
(λx. x x) (λx. x x)

jopython

#4
If you are using the bash shell, you can simply run "disown"

tomtoo

#5
or use screen and detach the session...

csfreebird

#6
disown, thanks, I got another way.