Bug #11023 Updated: exec does not wait for completion of cmd

From: Date: Sat, 12 Jan 2002 11:47:37 +0000
Subject: Bug #11023 Updated: exec does not wait for completion of cmd
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76747@lists.php.net to get a copy of this message
ID: 11023 Updated by: lobbin Reported By: terry@advertwizard.com Old Status: Feedback Status: Closed Bug Type: Program Execution Operating System: slackware 7 PHP Version: 4.0.5 New Comment: No feedback, closing. Previous Comments: ------------------------------------------------------------------------ [2001-12-22 07:04:10] lobbin@php.net Does this happen on 4.1.0? R. ------------------------------------------------------------------------ [2001-05-22 13:14:30] terry@advertwizard.com $cmd = "mv " . SITES_IMP . "site_* " . DB_UPDATES; exec($cmd); $arr = array(); $cmd = "ls " . DB_UPDATES . " site_* | wc -l"; exec($cmd,$arr); i am of the impression that code proceeding an exec cmd will not execute until the exec is finished in the above instance, the "ls" exec is executing before the "mv" exec has finished - when i know that 10 files have been moved, the "ls" exec returns 0 for a "wc -l", when running the code again it returns the number of files correctly - have placed sleeps between the commands and all works well wondered if this is a bug in the exec cmd or my misunderstanding of its use ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=11023&edit=1

« previous php.dev (#76747) next »