gitignore cache

This commit is contained in:
2026-04-08 21:19:52 -06:00
parent d80ff847d8
commit f9cd2bf579
3 changed files with 17033 additions and 8 deletions

1
.gitignore vendored
View File

@ -36,6 +36,7 @@ Thumbs.db
# Logs
*.log
logs/
cache/
# Build output
frontend/dist/

16982
chap4_proj/smoking.aive Normal file

File diff suppressed because it is too large Load Diff

58
close
View File

@ -3,15 +3,58 @@
KILLED_ANY=0
kill_pids() {
local label=$1
shift
local pids=("$@")
[[ ${#pids[@]} -eq 0 ]] && return
echo "Stopping $label (PID(s): ${pids[*]})..."
kill -TERM "${pids[@]}" 2>/dev/null || true
sleep 0.7
local survivors=()
local pid
for pid in "${pids[@]}"; do
if kill -0 "$pid" 2>/dev/null; then
survivors+=("$pid")
fi
done
if [[ ${#survivors[@]} -gt 0 ]]; then
echo "Force killing stubborn $label PID(s): ${survivors[*]}"
kill -KILL "${survivors[@]}" 2>/dev/null || true
fi
KILLED_ANY=1
}
kill_tree() {
local pid=$1
local children
children=$(pgrep -P "$pid" 2>/dev/null || true)
if [[ -n "$children" ]]; then
local child
for child in $children; do
kill_tree "$child"
done
fi
kill_pids "process tree" "$pid"
}
kill_port() {
local port=$1
local name=$2
local pids
pids=$(lsof -ti tcp:"$port" 2>/dev/null)
if [[ -n "$pids" ]]; then
echo "Stopping $name backend (port $port, PID $pids)..."
kill "$pids" 2>/dev/null
KILLED_ANY=1
# Kill any children first so watcher subprocesses do not survive.
local pid
for pid in $pids; do
kill_tree "$pid"
done
kill_pids "$name listener on port $port" $pids
fi
}
@ -21,17 +64,16 @@ kill_pattern() {
local pids
pids=$(pgrep -f "$pattern" 2>/dev/null)
if [[ -n "$pids" ]]; then
echo "Stopping $label..."
kill $pids 2>/dev/null
KILLED_ANY=1
kill_pids "$label" $pids
fi
}
# --- TalkEdit (Tauri, port 8000) ---
kill_port 8000 "TalkEdit"
kill_port 5173 "TalkEdit frontend"
kill_pattern "tauri.*TalkEdit\|TalkEdit.*tauri\|cargo.*tauri dev\|/TalkEdit/target/debug" "TalkEdit (Tauri dev)"
# Vite dev server for TalkEdit (port 5173)
kill_pattern "vite.*5173\|rsbuild.*5173" "TalkEdit frontend dev server"
# Vite dev server for TalkEdit (fallback when not bound to 5173 yet)
kill_pattern "[/ ]vite([[:space:]]|$)\|[/ ]rsbuild([[:space:]]|$)" "TalkEdit frontend dev server"
# --- CutScript (Electron, port 8642) ---
kill_port 8642 "CutScript"