Linux

shopt nohup

구차니 2023. 1. 27. 15:08

huponexit 는 off가 기본값인데

on으로 할경우 &로 백그라운드로 실행된 프로그램들이 세션 종료시 종료되지 않고 계속 실행된다고 한다.

$ shopt -s huponexit

위의 명령을 실행하면 set이 되어 on이 된다. (세션별로 적용된다)

 

$ shopt
autocd          off
cdable_vars     off
cdspell         off
checkhash       off
checkjobs       off
checkwinsize    on
cmdhist         on
compat31        off
compat32        off
compat40        off
compat41        off
compat42        off
compat43        off
complete_fullquote      on
direxpand       off
dirspell        off
dotglob         off
execfail        off
expand_aliases  on
extdebug        off
extglob         on
extquote        on
failglob        off
force_fignore   on
globasciiranges off
globstar        off
gnu_errfmt      off
histappend      on
histreedit      off
histverify      off
hostcomplete    off
huponexit       off
inherit_errexit off
interactive_comments    on
lastpipe        off
lithist         off
login_shell     off
mailwarn        off
no_empty_cmd_completion off
nocaseglob      off
nocasematch     off
nullglob        off
progcomp        on
promptvars      on
restricted_shell        off
shift_verbose   off
sourcepath      on
xpg_echo        off

 

[링크 : https://joonyon.tistory.com/entry/쉽게-설명한-nohup-과-백그라운드-명령어-사용법]

[링크 : https://rhr0916.tistory.com/62]

[링크 : https://m.blog.naver.com/2feelus/220363644372]