New answers tagged kill
0
votes
Close / kill / hide single Terminal window in bash on 'process complete'
Something more generic for using with Linux and macOS:
#!/bin/bash -e
function kill_self_terminal {
local tk_child_pid=$1
if [[ $tk_child_pid == 1 ]]; then
return 1
fi
local tk_parent_pid=...
Top 50 recent answers are included
Related Tags
kill × 675process × 263
linux × 113
bash × 107
signals × 81
shell-script × 66
shell × 53
process-management × 41
ps × 38
background-process × 37
command-line × 32
ssh × 20
ubuntu × 19
terminal × 18
scripting × 14
job-control × 14
pkill × 14
centos × 12
nohup × 12
jobs × 12
debian × 11
sudo × 11
pipe × 10
macos × 10
rhel × 9