| 166 |
fi |
fi |
| 167 |
-------------------- |
-------------------- |
| 168 |
|
|
| 169 |
Here trailing "`|| true`" was needed to ensure this shell script will not exit at this line accidentally when shell is invoked with "`-e`" flag. |
Here trailing "`|| true`" was needed to ensure this shell script does not exit at this line accidentally when shell is invoked with "`-e`" flag. |
| 170 |
|
|
| 171 |
.List of file comparison operators in the conditional expression |
.List of file comparison operators in the conditional expression |
| 172 |
[grid="all"] |
[grid="all"] |
| 515 |
|
|
| 516 |
- Run the program under `gdb`(1). |
- Run the program under `gdb`(1). |
| 517 |
- Reproduce crash. |
- Reproduce crash. |
| 518 |
* It will cause you to be dropped back to the `gdb` prompt. |
* It causes you to be dropped back to the `gdb` prompt. |
| 519 |
- Type "`bt`" at the `gdb` prompt. |
- Type "`bt`" at the `gdb` prompt. |
| 520 |
|
|
| 521 |
In case of program freeze, you can crash the program by pressing `Ctrl-C` in the terminal running `gdb` to obtain `gdb` prompt. |
In case of program freeze, you can crash the program by pressing `Ctrl-C` in the terminal running `gdb` to obtain `gdb` prompt. |
| 522 |
|
|
| 523 |
TIP: Often, you will see a backtrace where one or more of the top lines are in "`malloc()`" or "`g_malloc()`". When this happens, chances are your backtrace isn\'t very useful. The easiest way to find some useful information is to set the environment variable "`$MALLOC_CHECK_`" to a value of 2 (`malloc`(3)). You can do this while running `gdb` by doing the following. |
TIP: Often, you see a backtrace where one or more of the top lines are in "`malloc()`" or "`g_malloc()`". When this happens, chances are your backtrace isn\'t very useful. The easiest way to find some useful information is to set the environment variable "`$MALLOC_CHECK_`" to a value of 2 (`malloc`(3)). You can do this while running `gdb` by doing the following. |
| 524 |
|
|
| 525 |
-------------------- |
-------------------- |
| 526 |
$ MALLOC_CHECK_=2 gdb hello |
$ MALLOC_CHECK_=2 gdb hello |
| 667 |
|
|
| 668 |
WARNING: Do not overwrite system files with your compiled programs when installing them. |
WARNING: Do not overwrite system files with your compiled programs when installing them. |
| 669 |
|
|
| 670 |
Debian does not touch files in "`/usr/local/`" or "`/opt`". So if you compile a program from source, install it into "`/usr/local/`" so it will not interfere with Debian. |
Debian does not touch files in "`/usr/local/`" or "`/opt`". So if you compile a program from source, install it into "`/usr/local/`" so it does not interfere with Debian. |
| 671 |
|
|
| 672 |
-------------------- |
-------------------- |
| 673 |
$ cd src |
$ cd src |
| 737 |
Basic interactive dynamic web pages can be made as follows. |
Basic interactive dynamic web pages can be made as follows. |
| 738 |
|
|
| 739 |
- Queries are presented to the browser user using http://en.wikipedia.org/wiki/HTML[HTML] forms. |
- Queries are presented to the browser user using http://en.wikipedia.org/wiki/HTML[HTML] forms. |
| 740 |
- Filling and clicking on the form entries will send one of the following http://en.wikipedia.org/wiki/Uniform_Resource_Locator[URL] string with encoded parameters from the browser to the web server. |
- Filling and clicking on the form entries sends one of the following http://en.wikipedia.org/wiki/Uniform_Resource_Locator[URL] string with encoded parameters from the browser to the web server. |
| 741 |
* "`http://www.foo.dom/cgi-bin/program.pl?VAR1=VAL1&VAR2=VAL2&VAR3=VAL3`" |
* "`http://www.foo.dom/cgi-bin/program.pl?VAR1=VAL1&VAR2=VAL2&VAR3=VAL3`" |
| 742 |
* "`http://www.foo.dom/cgi-bin/program.py?VAR1=VAL1&VAR2=VAL2&VAR3=VAL3`" |
* "`http://www.foo.dom/cgi-bin/program.py?VAR1=VAL1&VAR2=VAL2&VAR3=VAL3`" |
| 743 |
* "`http://www.foo.dom/program.php?VAR1=VAL1&VAR2=VAL2&VAR3=VAL3`" |
* "`http://www.foo.dom/program.php?VAR1=VAL1&VAR2=VAL2&VAR3=VAL3`" |
| 744 |
- "`%nn`" in URL is replaced with a character with hexadecimal `nn` value. |
- "`%nn`" in URL is replaced with a character with hexadecimal `nn` value. |
| 745 |
- The environment variable is set as: "`QUERY_STRING="VAR1=VAL1 VAR2=VAL2 VAR3=VAL3"`". |
- The environment variable is set as: "`QUERY_STRING="VAR1=VAL1 VAR2=VAL2 VAR3=VAL3"`". |
| 746 |
- http://en.wikipedia.org/wiki/Common_Gateway_Interface[CGI] program (any one of "`program.\*`") on the web server executes itself with the environment variable "`$QUERY_STRING`". |
- http://en.wikipedia.org/wiki/Common_Gateway_Interface[CGI] program (any one of "`program.\*`") on the web server executes itself with the environment variable "`$QUERY_STRING`". |
| 747 |
- `stdout` of CGI program will be sent to the web browser and is presented as an interactive dynamic web page. |
- `stdout` of CGI program is sent to the web browser and is presented as an interactive dynamic web page. |
| 748 |
|
|
| 749 |
For security reasons it is better not to hand craft new hacks for parsing CGI parameters. There are established modules for them in Perl and Python. http://en.wikipedia.org/wiki/PHP[PHP] comes with these functionalities. When client data storage is needed, http://en.wikipedia.org/wiki/HTTP_cookie[HTTP cookies] are used. When client side data processing is needed, http://en.wikipedia.org/wiki/JavaScript[Javascript] is frequently used. |
For security reasons it is better not to hand craft new hacks for parsing CGI parameters. There are established modules for them in Perl and Python. http://en.wikipedia.org/wiki/PHP[PHP] comes with these functionalities. When client data storage is needed, http://en.wikipedia.org/wiki/HTTP_cookie[HTTP cookies] are used. When client side data processing is needed, http://en.wikipedia.org/wiki/JavaScript[Javascript] is frequently used. |
| 750 |
|
|