|
Posted by Ulrich Schφbel on 11/03/94 11:32
Hi Phillip,
soory, I didn't follow the entire thread. From your description
I'd derive something like
if {[catch {exec php ...........} error]} {
puts stderr $error
exit 1
}
Then the Tcl script commits suicide on the death of your php script.
Best regards
Ulrich
In article <1132585996.564652.204510@g49g2000cwa.googlegroups.com>,
"comp.lang.tcl" <phillip.s.powell@gmail.com> writes:
> The behavior I want is to reflect the behavior of the called PHP
> script.
>
> You will input some data. If you do NOT input some data (such as hit
> "Enter" instead of entering data), it will throw an error message and
> die. If you just sit there and enter nothing, it just sits there and
> does nothing until you enter something.
>
> That is how the PHP script works, which I will spare you from having to
> view PHP code to verify.
>
> The problem is that the TCL script, while it now successfully pipes in
> stdout and stderr, doesn't pipe in "exit()", the PHP function that
> reflected as such:
>
> [PHP]
> if (!$response) die('You must enter a username');
> [/PHP]
>
> Instead TCL just moves on to the next statement, instead of just dying
> at that spot.
>
> Phil
>
> Cameron Laird wrote:
>> In article <1132452443.558092.275200@g14g2000cwa.googlegroups.com>,
>> comp.lang.tcl <phillip.s.powell@gmail.com> wrote:
>> .
>> .
>> .
>> >Problem is that the PHP script contains an exit() function that dies if
>> >user does not input something upon prompting. The TCL script does not
>> >die, it keeps going, which is not the desired effect, but hey I'm
>> >halfway there already, thanx!!
>> .
>> .
>> .
>> You're welcome.
>>
>> Why is it a "[p]roblem ... that the PHP script contains
>> an exit() function that dies ..."? What sort of behavior
>> do you want? Do you want your Tcl script to undo this
>> setting? Are you saying that you want the Tcl coding to
>> allow user input, but to pass some default response
>> through to PHP if the user "times out"? Or are you saying
>> that you want to Tcl script to notice when the PHP one has
>> "died", and itself exit?
>
[Back to original message]
|