php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18711 PHP script will exit on ouput to non-existent SSH session
Submitted: 2002-08-02 15:09 UTC Modified: 2002-08-02 15:42 UTC
From: dodo at fuckmicrosoft dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.2.1 OS: freeBSD 4.5
Private report: No CVE-ID: None
 [2002-08-02 15:09 UTC] dodo at fuckmicrosoft dot com
I run a shell scrypt wich adds accounts for me, when I start the shellsscript:
./myscript &

#!/usr/local/bin/php -q
while(1) {
// adduser stuff
sleep(10);
}

when I start it it perfectly runs and works, but when I close the SSH session and come back later [when the script has outputted stuff to a non existent SSH session [where I started the script from]] the process is gone...

freeBSD 4.5
PHP 4.2.1
compile: ./configure --with-mysql --with-apxs=/www/bin/apxs

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-02 15:29 UTC] cynic@php.net
sure. your shell kills all processes your processes when you log out.


 [2002-08-02 15:42 UTC] cynic@php.net
bleh, cannot write i can't.

anyway. the problem is that your shell shoots down all your processes which are in its process tree or something like that.

there are shell specific ways to change this (i use zsh, which has the 'disown' builtin), or you can use nohup(1), which should be quite common. :)

 [2002-08-02 19:12 UTC] dodo at fuckmicrosoft dot com
thanks, I guess that must be it

sorry for the bugreport
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 19:00:01 2026 UTC