Run clean_exit instead of die on SIGINT/SIGUSR1
This commit is contained in:
parent
d8c85b460a
commit
362bbda3f5
@ -558,8 +558,8 @@ send_stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# if the user press ctrl+c then execute die()
|
# if the user press ctrl+c then execute die()
|
||||||
trap "die" SIGINT
|
trap "clean_exit" SIGINT
|
||||||
trap "die" SIGUSR1
|
trap "clean_exit" SIGUSR1
|
||||||
|
|
||||||
ARGS=( "$@" )
|
ARGS=( "$@" )
|
||||||
GETOPT_ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","daemon","stop:","list" -n $(basename $0) -- "$@")
|
GETOPT_ARGS=$(getopt -o hc:w:g:dnm: -l "help","hidden","ieee80211n","ht_capab:","driver:","no-virt","fix-unmanaged","country:","freq-band:","mac:","daemon","stop:","list" -n $(basename $0) -- "$@")
|
||||||
@ -693,7 +693,7 @@ if [[ $DAEMONIZE -eq 1 ]]; then
|
|||||||
[[ "$x" != "--daemon" ]] && NEW_ARGS+=( "$x" )
|
[[ "$x" != "--daemon" ]] && NEW_ARGS+=( "$x" )
|
||||||
done
|
done
|
||||||
|
|
||||||
# fork()/setsid()/fork()
|
# run a detached create_ap
|
||||||
setsid "$0" "${NEW_ARGS[@]}" &
|
setsid "$0" "${NEW_ARGS[@]}" &
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user