Sto provando a inviare un segnale al server di sviluppo django per uccidere i processi padre e figlio.Segnale appropriato per uccidere il server di sviluppo django
$ python manage.py runserver
Validating models...
0 errors found
Django version 1.4.1, using settings 'myproject.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
$ ps axf
26077 pts/12 Ss 0:00 \_ -bash
4189 pts/12 S+ 0:00 | \_ python manage.py runserver
4194 pts/12 Sl+ 0:00 | \_ /myproject/.virtualenv/bin/python manage.py runserver
$ kill -s SIGINT 4189
$ ps axf
4194 pts/12 Sl 0:00 /sh/myproject/.virtualenv/bin/python manage.py runserver
mia comprensione è che SIGINT dovrebbe emulare premendo Ctrl-C nel terminale, a meno di notare che SIGINT termina il genitore, 4189, ma non il bambino, 4194. stesso comportamento per SIGKILL, SIGTERM, SIGSTOP. Usando Ctrl-C dal terminale uccide entrambi come previsto.
C'è un modo per terminare il genitore in un modo che uccide anche il bambino senza conoscere il PID del bambino?
"C'è un modo per terminare il genitore in un modo che uccide anche il bambino? " Spero di uccidere indirettamente il bambino uccidendo solo il genitore. Sto tentando di eseguire il server dev django supervisionato usando la suite runit senza usare --noreload. – Aaron
@ Aaron, questa risposta ha funzionato per me ma la risposta accettata non – Gab