Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

718 B
Raw Blame
#!/usr/bin/env bash

# This script spawns child processes and then exits early
echo "Parent process started with PID $$"

# Spawn multiple child processes that will outlive the parent
for i in {1..3}; do
  (
    # Child process
    child_pid=$BASHPID
    echo "Child $i started with PID $child_pid"

    # Spawn a grandchild that runs for a long time
    (
      grandchild_pid=$BASHPID
      echo "Grandchild of child $i started with PID $grandchild_pid"
      # Keep running for 30 seconds
      sleep 30
    ) &

    # Keep the child running
    sleep 30
  ) &
done

# Give children time to start
sleep 0.5

# Exit early (simulating a crash or early termination)
echo "Parent exiting early with status 1..."
exit 1