티스토리 뷰

728x90

[Ubuntu] Linux terminal process without kill after logout 


AWS로 프로젝트를 업로드하여 실행했는데, 

시간이 지나 ssh 세션이 종료될때마다 재시작을 해줘야하는 번거로움이 있었다.


그래서 세션이 지나고 터미널을 종료하더라도,

서비스가 죽지 않게 하는 것을 stackoverflow에서 찾아 메모한다.



$ [Command] & disown


!!! 왜 그런지 이유는 모르겠지만, `& disown`으로 실행한 뒤, 바로 해당 ssh 연결을 끊어야 node server가 API 요청에 pendding 걸리지 않는다.

1시간 정도 이것때문에 삽질했다.. 하..;;


그리고 AWS 서비스를 재부팅하면, mongoDB 데이터가 날아가므로 주의하자... 내 데이터 ㅠㅠ..



[출처]: https://unix.stackexchange.com/questions/4004/how-can-i-close-a-terminal-without-killing-the-command-running-in-it


728x90

'공부' 카테고리의 다른 글

[BFS & DFS] tomato  (0) 2018.09.16
[DataStructure] Queue?  (0) 2018.09.13
[Sort] QuickSort  (0) 2018.09.11
[DP] changeCoin?  (0) 2018.09.08
[Greedy] jewelryThief - priority_queue(heap)  (0) 2018.09.08
댓글