1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<package name="fcl">
<!--
====================================================================
process
====================================================================
-->
<module name="process">
<short>Unit implementing the <var>TProcess</var> component.</short>
<descr>
<p>
The <file>Process</file> unit contains the code for the <link id="TProcess"/>
component, a cross-platform component to start and control other programs,
offering also access to standard input and output for these programs.
</p>
<p>
<var>TProcess</var> does not handle wildcard expansion, does not support
complex pipelines as in Unix. If this behaviour is desired, the shell can be
executed with the pipeline as the command it should execute.
</p>
</descr>
<!-- unresolved type reference Visibility: default -->
<element name="Classes">
<short>For <var>TComponent</var> and <var>TStream</var> definitions.</short>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="pipes">
<short>For pipe streams.</short>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="SysUtils">
<short>For exception support.</short>
</element>
<!-- enumeration type Visibility: default -->
<element name="TProcessOption">
<short>Options to be used when a process is started. </short>
<descr>
When a new process is started using <link id="TProcess.Execute"/>,
these options control the way the process is started. Note that not all
options are supported on all platforms.
</descr>
<seealso>
<link id="TProcessOptions"/>
<link id="TShowWindowOptions"/>
</seealso>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poRunSuspended">
<short>Start the process in suspended state.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poWaitOnExit">
<short>Wait for the process to terminate before returning.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poUsePipes">
<short>Use pipes to redirect standard input and output.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poStderrToOutPut">
<short>Redirect standard error to the standard output stream.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poNoConsole">
<short>Do not allow access to the console window for the process (Win32 only)</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poNewConsole">
<short>Start a new console window for the process (Win32 only)</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poDefaultErrorMode">
<short>Use default error handling.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poNewProcessGroup">
<short>Start the process in a new process group (Win32 only)</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poDebugProcess">
<short>Allow debugging of the process (Win32 only)</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessOption.poDebugOnlyThisProcess">
<short>Do not follow processes started by this process (Win32 only)</short>
</element>
<!-- enumeration type Visibility: default -->
<element name="TShowWindowOptions">
<short>Description of the main window of the new process.</short>
<descr>
This type describes what the new process' main window should look like.
Most of these have only effect on Windows. They are ignored on other
systems.
</descr>
<seealso>
<link id="TProcessOption"/>
</seealso>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoNone">
<short>Allow system to position the window.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoHIDE">
<short>The main window is hidden.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoMaximize">
<short>The main window is maximized.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoMinimize">
<short>The main window is minimized.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoRestore">
<short>Restore the previous position.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoShow">
<short>Show the main window.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoShowDefault">
<short>When showing Show the main window on</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoShowMaximized">
<short>The main window is shown maximized</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoShowMinimized">
<short>The main window is shown minimized</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoshowMinNOActive">
<short>The main window is shown minimized but not activated</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoShowNA">
<short>The main window is shown but not activated</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoShowNoActivate">
<short>The main window is shown but not activated</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TShowWindowOptions.swoShowNormal">
<short>The main window is shown normally</short>
</element>
<!-- enumeration type Visibility: default -->
<element name="TStartupOption">
<short>Options determining how the application is started.</short>
<descr>
These options are mainly for Win32, and determine what should be done with
the application once it's started.
</descr>
<seealso>
<link id="TShowWindowOptions"/>
<link id="TProcessOptions"/>
</seealso>
</element>
<!-- enumeration value Visibility: default -->
<element name="TStartupOption.suoUseShowWindow">
<short>Use the Show Window options specified in <link id="#fcl.process.TShowWindowOptions">TShowWindowOption</link></short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TStartupOption.suoUseSize">
<short>Use the window sizes as specified in <link id="#fcl.process.TProcess">TProcess</link></short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TStartupOption.suoUsePosition">
<short>Use the window sizes as specified in <link id="#fcl.process.TProcess">TProcess</link>.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TStartupOption.suoUseCountChars">
<short>Use the console character width as specified in <link id="#fcl.process.TProcess">TProcess</link>.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TStartupOption.suoUseFillAttribute">
<short>Use the console fill attribute as specified in <link id="#fcl.process.TProcess">TProcess</link>.</short>
</element>
<!-- enumeration type Visibility: default -->
<element name="TProcessPriority">
<short>type determining the priority of the newly started process.</short>
<descr>
This enumerated type determines the priority of the newly started process.
It translates to default platform specific constants. If finer control is
needed, then platform-dependent mechanism need to be used to set the priority.
</descr>
<seealso>
</seealso>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessPriority.ppHigh">
<short>The process runs at higher than normal priority.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessPriority.ppIdle">
<short>The process only runs when the system is idle (i.e. has nothing else
to do)</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessPriority.ppNormal">
<short>The process runs at normal priority.</short>
</element>
<!-- enumeration value Visibility: default -->
<element name="TProcessPriority.ppRealTime">
<short>The process runs at real-time priority.</short>
</element>
<!-- set type Visibility: default -->
<element name="TProcessOptions">
<short>Set of <link id="#fcl.process.TProcessOption">TProcessOption</link>.</short>
</element>
<!-- set type Visibility: default -->
<element name="TstartUpoptions">
<short>Set of <link id="#fcl.process.TStartupOption">TStartUpOption</link>.</short>
</element>
<!-- object Visibility: default -->
<element name="EProcess">
<short>Exception raised when an error occurs in a TProcess routine.</short>
<seealso>
<link id="TProcess">TProcess</link>
</seealso>
</element>
<!-- object Visibility: default -->
<element name="TProcess">
<short>Class to start and control other processes.</short>
<descr>
<p>
<var>TProcess</var> is a component that can be used to start and control
other processes (programs/binaries). It contains a lot of options that
control how the process is started. Many of these are Win32 specific, and
have no effect on other platforms, so they should be used with care.
</p>
<p>
The simplest way to use this component is to create an instance, set the
<link id="TProcess.CommandLine">CommandLine</link> property to the full pathname of the program
that should be executed, and call <link id="TProcess.Execute">Execute</link>.
To determine whether the process is still running (i.e. has not stopped
executing), the <link id="TProcess.Running">Running</link> property can be checked.
</p>
<p>
More advanced techniques can be used with the <link
id="TProcess.Options">Options</link> settings.
</p>
</descr>
<seealso>
<link id="TProcess.Create">Create</link>
<link id="TProcess.Execute">Execute</link>
<link id="TProcess.Running">Running</link>
<link id="TProcess.CommandLine">CommandLine</link>
<link id="TProcess.Options">Options</link>
</seealso>
</element>
<!-- constructor Visibility: public -->
<element name="TProcess.Create">
<short>Create a new instance of the <var>TProcess</var> class.</short>
<descr>
<var>Create</var> creates a new instance of the <var>TProcess</var> class.
After calling the inherited constructor, it simply sets some default values.
</descr>
</element>
<!-- argument Visibility: default -->
<element name="TProcess.Create.AOwner">
<short>Owner of the instance.</short>
</element>
<!-- destructor Visibility: public -->
<element name="TProcess.Destroy">
<short>Destroy this instance of <var>TProcess</var></short>
<descr>
<var>Destroy</var> cleans up this instance of <var>TProcess</var>.
Prior to calling the inherited destructor, it cleans up any streams that may
have been created. If a process was started and is still executed, it is
<em>not</em> stopped, but the standard input/output/stderr streams are no
longer available, because they have been destroyed.
</descr>
<errors>
None.
</errors>
<seealso>
<link id="TProcess.Create">Create</link>
</seealso>
</element>
<!-- procedure Visibility: public -->
<element name="TProcess.Execute">
<short>Execute the program with the given options</short>
<descr>
<p>
<var>Execute</var> actually executes the program as specified in <link
id="TProcess.CommandLine">CommandLine</link>, applying as much as of the
specified options as supported on the current platform.
</p>
<p>
If the <var>poWaitOnExit</var> option is specified in <link
id="TProcess.Options">Options</link>, then the call will only return when the
program has finished executing (or if an error occured). If this option is
not given, the call returns immediatly, but the <link
id="TProcess.WaitOnExit">WaitOnExit</link> call can be used to wait for it to close, or the
<link id="TProcess.Running">Running</link> call can be used to check whether it is still
running.
</p>
<p>
The <link id="TProcess.Terminate"/> call can be used to terminate the
program if it is still running, or the <link
id="TProcess.Suspend">Suspend</link> call can be used to temporarily stop the
program's execution.
</p>
<p>
The <link id="TProcess.ExitStatus">ExitStatus</link> function can be used to
check the program's exit status, after it has stopped executing.
</p>
</descr>
<errors>
On error a <link id="EProcess"/> exception is raised.
</errors>
<seealso>
<link id="TProcess.Running"/>
<link id="TProcess.WaitOnExit"/>
<link id="TProcess.Terminate"/>
<link id="TProcess.Suspend"/>
<link id="TProcess.Resume"/>
<link id="TProcess.ExitStatus"/>
</seealso>
</element>
<!-- function Visibility: public -->
<element name="TProcess.Resume">
<short>Resume execution of a suspended process</short>
<descr>
<var>Resume</var> should be used to let a suspended process resume it's
execution. It should be called in particular when the
<var>poRunSuspended</var> flag is set in <link
id="TProcess.Options">Options</link>.
</descr>
<errors>
None.
</errors>
<seealso>
<link id="TProcess.Suspend"/>
<link id="TProcess.Options"/>
<link id="TProcess.Execute"/>
<link id="TProcess.Terminate"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="TProcess.Resume.Result">
<short>0 on success, nonzero otherwise.</short>
</element>
<!-- function Visibility: public -->
<element name="TProcess.Suspend">
<short>Suspend a running process</short>
<descr>
<p>
<var>Suspend</var> suspends a running process. If the call is successful,
the process is suspended: it stops running, but can be made to execute again
using the <link id="TProcess.Resume">Resume</link> call.
</p>
<p>
<var>Suspend</var> is fundamentally different from <link
id="TProcess.Terminate"/> which actually stops the process.
</p>
</descr>
<errors>
On error, a nonzero result is returned.
</errors>
<seealso>
<link id="TProcess.Options"/>
<link id="TProcess.Resume"/>
<link id="TProcess.Terminate"/>
<link id="TProcess.Execute"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="TProcess.Suspend.Result">
<short>0 on success, nonzero otherwise.</short>
</element>
<!-- function Visibility: public -->
<element name="TProcess.Terminate">
<short>Terminate a running process</short>
<descr>
<p>
<var>Terminate</var> stops the execution of the running program.
It effectively stops the program.
</p>
<p>
On Windows, the program will report an exit code of <var>AExitCode</var>, on
other systems, this value is ignored.
</p>
</descr>
<errors>
On error, a nonzero value is returned.
</errors>
<seealso>
<link id="TProcess.ExitStatus"/>
<link id="TProcess.Suspend"/>
<link id="TProcess.Execute"/>
<link id="TProcess.WaitOnExit"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="TProcess.Terminate.Result">
<short>0 on succes, nonzero for failure. </short>
</element>
<!-- argument Visibility: default -->
<element name="TProcess.Terminate.AExitCode">
<short>Exit status to report (Windows only)</short>
</element>
<!-- function Visibility: public -->
<element name="TProcess.WaitOnExit">
<short>Wait for the program to stop executing.</short>
<descr>
<p>
<var>WaitOnExit</var> waits for the running program to exit. It returns
<var>True</var> if the wait was succesful, or <var>False</var> if there
was some error waiting for the program to exit.
</p>
<p>
Note that the return value of this function has changed. The old return
value was a DWord with a platform dependent error code. To make things
consistent and cross-platform, a boolean return type was used.
</p>
</descr>
<errors>
On error, <var>False</var> is returned. No extended error information is
available, as it is highly system dependent.
</errors>
<seealso>
<link id="TProcess.ExitStatus"/>
<link id="TProcess.Terminate"/>
<link id="TProcess.Running"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="TProcess.WaitOnExit.Result">
<short><var>True</var> means the process was successfully waited on, <var>False</var> indicates some error occurred.</short>
</element>
<!-- property Visibility: public -->
<element name="TProcess.WindowRect">
<short>Positions for the main program window.</short>
<descr>
<var>WindowRect</var> can be used to specify the position of
</descr>
<seealso>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.Handle">
<short>Handle of the process</short>
<descr>
<p>
<var>Handle</var> identifies the process. In Unix systems, this is the
process ID. On windows, this is the process handle. It can be used to signal
the process.
</p>
<p>
The handle is only valid after <link id="TProcess.Execute"/> has been
called. It is not reset after the process stopped.
</p>
</descr>
<seealso>
<link id="TProcess.ThreadHandle"/>
<link id="TProcess.ProcessID"/>
<link id="TProcess.ThreadID"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.ProcessHandle">
<short>Alias for <link id="#fcl.process.tprocess.handle">Handle</link></short>
<descr>
<p>
<var>ProcessHandle</var> equals <link id="TProcess.Handle">Handle</link> and
is provided for completeness only.
</p>
</descr>
<seealso>
<link id="TProcess.Handle"/>
<link id="TProcess.ThreadHandle"/>
<link id="TProcess.ProcessID"/>
<link id="TProcess.ThreadID"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.ThreadHandle">
<short>Main process thread handle</short>
<descr>
<p>
<var>ThreadHandle</var> is the main process thread handle. On Unix, this is
the same as the process ID, on Windows, this may be a different handle than
the process handle.
</p>
<p>
The handle is only valid after <link id="TProcess.Execute"/> has been
called. It is not reset after the process stopped.
</p>
</descr>
<seealso>
<link id="TProcess.Handle"/>
<link id="TProcess.ProcessID"/>
<link id="TProcess.ThreadID"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.ProcessID">
<short>ID of the process.</short>
<descr>
<p>
<var>ProcessID</var> is the ID of the process. It is the same as the handle
of the process on Unix systems, but on Windows it is different from the
process Handle.
</p>
<p>
The ID is only valid after <link id="TProcess.Execute"/> has been
called. It is not reset after the process stopped.
</p>
</descr>
<seealso>
<link id="TProcess.Handle"/>
<link id="TProcess.ThreadHandle"/>
<link id="TProcess.ThreadID"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.ThreadID">
<short>ID of the main process thread</short>
<descr>
<p>
<var>ProcessID</var> is the ID of the main process thread. It is the same as the handle
of the main proces thread (or the process itself) on Unix systems, but on Windows it
is different from the thread Handle.
</p>
<p>
The ID is only valid after <link id="TProcess.Execute"/> has been
called. It is not reset after the process stopped.
</p>
</descr>
<seealso>
<link id="TProcess.ProcessID"/>
<link id="TProcess.Handle"/>
<link id="TProcess.ThreadHandle"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.Input">
<short>Stream connected to standard input of the process.</short>
<descr>
<p>
<var>Input</var> is a stream which is connected to the process' standard
input file handle. Anything written to this stream can be read by the
process.
</p>
<p>The <var>Input</var> stream is only instantiated when the
<var>poUsePipes</var> flag is used in <link id="TProcess.Options">Options</link>.
</p>
<p>
Note that writing to the stream may cause the calling process to be
suspended when the created process is not reading from it's input,
or to cause errors when the process has terminated.
</p>
</descr>
<seealso>
<link id="TProcess.OutPut"/>
<link id="TProcess.StdErr"/>
<link id="TProcess.Options"/>
<link id="TProcessOption"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.OutPut">
<short>Stream connected to standard output of the process.</short>
<descr>
<p>
<var>Output</var> is a stream which is connected to the process' standard
output file handle. Anything written to standard output by the created
process can be read from this stream.
</p>
<p>
The <var>Output</var> stream is only instantiated when the
<var>poUsePipes</var> flag is used in <link id="TProcess.Options">Options</link>.
</p>
<p>
The <var>Output</var> stream also contains any data written to standard
diagnostic output (<var>stderr</var>) when the
<var>poStdErrToOutPut</var> flag is used in <link id="TProcess.Options">Options</link>.
</p>
<p>
Note that reading from the stream may cause the calling process to be
suspended when the created process is not writing anything to standard
output, or to cause errors when the process has terminated.
</p>
</descr>
<seealso>
<link id="TProcess.InPut"/>
<link id="TProcess.StdErr"/>
<link id="TProcess.Options"/>
<link id="TProcessOption"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.StdErr">
<short>Stream connected to standard diagnostic output of the process.</short>
<descr>
<p>
<var>StdErr</var> is a stream which is connected to the process' standard
diagnostic output file handle (<var>StdErr</var>). Anything written to
standard diagnostic output by the created process can be read from this
stream.
</p>
<p>
The <var>StdErr</var> stream is only instantiated when the
<var>poUsePipes</var> flag is used in <link
id="TProcess.Options">Options</link>.
</p>
<p>
The <var>Output</var> stream equals the <link id="TProcess.Output">Output</link>
when the <var>poStdErrToOutPut</var> flag is used in <link id="TProcess.Options">Options</link>.
</p>
<p>
Note that reading from the stream may cause the calling process to be
suspended when the created process is not writing anything to standard
output, or to cause errors when the process has terminated.
</p>
</descr>
<seealso>
<link id="TProcess.InPut"/>
<link id="TProcess.Output"/>
<link id="TProcess.Options"/>
<link id="TProcessOption"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.ExitStatus">
<short>Exit status of the process.</short>
<descr>
<p>
<var>ExitStatus</var> contains the exit status as reported by the process
when it stopped executing. The value of this property is only meaningful
when the process is no longer running. If it is not running then the value
is zero.
</p>
</descr>
<seealso>
<link id="TProcess.Running"/>
<link id="TProcess.Terminate"/>
</seealso>
</element>
<!-- property Visibility: public -->
<element name="TProcess.InheritHandles">
<short>Should the created process inherit the open handles of the current process.</short>
<descr>
<p>
<var>InheritHandles</var> determines whether the created process inherits
the open handles of the current process (value <var>True</var>) or not
(<var>False</var>).
</p>
<p>
On Unix, setting this variable has no effect.
</p>
</descr>
<seealso>
<link id="TProcess.InPut"/>
<link id="TProcess.Output"/>
<link id="TProcess.StdErr"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.Active">
<short>Start or stop the process.</short>
<descr>
<var>Active</var> starts the process if it is set to <var>True</var>, or
terminates the process if set to <var>False</var>. It's mostly intended for
use in an IDE.
</descr>
<seealso>
<link id="TProcess.Execute"/>
<link id="TProcess.Terminate"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.ApplicationName">
<short>Name of the application to start (deprecated)</short>
<descr>
<p>
<var>ApplicationName</var> is an alias for <link id="TProcess.CommandLine"/>.
It's mostly for use in the Windows <var>CreateProcess</var> call.
If <var>CommandLine</var> is not set, then <var>ApplicationName</var> will be
used instead.
</p>
<p>
<var>ApplicationName</var> is deprecated. New code should use <link
id="TProcess.Executable">Executable</link>
instead, and leave <var>ApplicationName</var> empty.
</p>
</descr>
<seealso>
<link id="TProcess.CommandLine"/>
<link id="TProcess.Executable"/>
<link id="TProcess.Parameters"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.CommandLine">
<short>Command-line to execute (deprecated)</short>
<descr>
<p>
<var>CommandLine</var> is deprecated. To avoid problems with command-line
options with spaces in them and the quoting problems that this entails,
it has been superseded by the properties <link id="TProcess.Executable"/> and
<link id="TProcess.Parameters"/> , which should be used instead of
<var>CommandLine</var>. New code should leave <var>CommandLine</var> empty.
</p>
<p>
<var>CommandLine</var> is the command-line to be executed: this is the name
of the program to be executed, followed by any options it should be passed.
</p>
<p>If the command to be executed or any of the arguments contains whitespace
(space, tab character, linefeed character) it should be enclosed in single
or double quotes.
</p>
<p>
If no absolute pathname is given for the command to be executed, it is
searched for in the <var>PATH</var> environment variable. On Windows, the
current directory always will be searched first. On other platforms, this is
not so.
</p>
<p>
Note that either <var>CommandLine</var> or <var>ApplicationName</var> must
be set prior to calling <var>Execute</var>.
</p>
</descr>
<seealso>
<link id="TProcess.ApplicationName"/>
<link id="TProcess.Executable"/>
<link id="TProcess.Parameters"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.ConsoleTitle">
<short>Title of the console window</short>
<descr>
<p>
<var>ConsoleTitle</var> is used on Windows when executing a console
application: it specifies the title caption of the console window. On other
platforms, this property is currently ignored.
</p>
<p>
Changing this property after the process was started has no effect.
</p>
</descr>
<seealso>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.WindowRows"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.CurrentDirectory">
<short>Working directory of the process.</short>
<descr>
<p>
<var>CurrentDirectory</var> specifies the working directory of the newly
started process.
</p>
<p>
Changing this property after the process was started has no effect.
</p>
</descr>
<seealso>
<link id="TProcess.Environment"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.DeskTop">
<short>Desktop on which to start the process.</short>
<descr>
<p>
<var>DeskTop</var> is used on Windows to determine on which desktop the
process' main window should be shown. Leaving this empty means the process
is started on the same desktop as the currently running process.
</p>
<p>
Changing this property after the process was started has no effect.
</p>
<p>
On unix, this parameter is ignored.
</p>
</descr>
<seealso>
<link id="TProcess.Input"/>
<link id="TProcess.Output"/>
<link id="TProcess.StdErr"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.Environment">
<short>Environment variables for the new process</short>
<descr>
<p>
<var>Environment</var> contains the environment for the new process;
it's a list of <var>Name=Value</var> pairs, one per line.
</p>
<p>
If it is empty, the environment of the current process is
passed on to the new process.
</p>
</descr>
<seealso>
<link id="TProcess.Options"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.Options">
<short>Options to be used when starting the process.</short>
<descr>
<p>
<var>Options</var> determine how the process is started.
They should be set before the <link id="TProcess.Execute">Execute</link> call is made.
</p>
<table>
<th><td>Option</td><td>Meaning</td></th>
<tr>
<td><var>poRunSuspended</var></td>
<td>Start the process in suspended state.</td>
</tr>
<tr>
<td><var>poWaitOnExit</var></td>
<td>Wait for the process to terminate before returning.</td>
</tr>
<tr>
<td><var>poUsePipes</var></td>
<td>Use pipes to redirect standard input and output.</td>
</tr>
<tr>
<td><var>poStderrToOutPut</var></td>
<td>Redirect standard error to the standard output stream.</td>
</tr>
<tr>
<td><var>poNoConsole</var></td>
<td>Do not allow access to the console window for the process (Win32 only)</td>
</tr>
<tr>
<td><var>poNewConsole</var></td>
<td>Start a new console window for the process (Win32 only)</td>
</tr>
<tr>
<td><var>poDefaultErrorMode</var></td>
<td>Use default error handling.</td>
</tr>
<tr>
<td><var>poNewProcessGroup</var></td>
<td>Start the process in a new process group (Win32 only)</td>
</tr>
<tr>
<td><var>poDebugProcess</var></td>
<td>Allow debugging of the process (Win32 only)</td>
</tr>
<tr>
<td><var>poDebugOnlyThisProcess</var></td>
<td>Do not follow processes started by this process (Win32 only)</td>
</tr>
</table>
</descr>
<seealso>
<link id="TProcessOption"/>
<link id="TProcessOptions"/>
<link id="TProcess.Priority"/>
<link id="TProcess.StartUpOptions"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.Priority">
<short>Priority at which the process is running.</short>
<descr>
<p>
<var>Priority</var> determines the priority at which the process is running.
</p>
<table>
<th><td>Priority</td><td>Meaning</td></th>
<tr>
<td><var>ppHigh</var></td>
<td>The process runs at higher than normal priority.</td>
</tr>
<tr>
<td><var>ppIdle</var></td>
<td>The process only runs when the system is idle (i.e. has nothing else to do)</td>
</tr>
<tr>
<td><var>ppNormal</var></td>
<td>The process runs at normal priority.</td>
</tr>
<tr>
<td><var>ppRealTime</var></td>
<td>The process runs at real-time priority.</td>
</tr>
</table>
<p>
Note that not all priorities can be set by any user. Usually, only users
with administrative rights (the root user on Unix) can set a higher process
priority.
</p>
<p>
On unix, the process priority is mapped on <var>Nice</var> values as
follows:
</p>
<table>
<th><td>Priority</td><td>Nice value</td></th>
<tr><td><var>ppHigh</var></td><td>20</td></tr>
<tr><td><var>ppIdle</var></td><td>20</td></tr>
<tr><td><var>ppNormal</var></td><td>0</td></tr>
<tr><td><var>ppRealTime</var></td><td>-20</td></tr>
</table>
</descr>
<seealso>
<link id="TProcessPriority"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.StartUpOptions">
<short>Additional (Windows) startup options</short>
<descr>
<p>
<var>StartUpOptions</var> contains additional startup options, used mostly
on Windows system. They determine which other window layout properties are
taken into account when starting the new process.
</p>
<table>
<th><td>Priority</td><td>Meaning</td></th>
<tr>
<td><var>suoUseShowWindow</var></td>
<td>Use the Show Window options specified in <link id="TProcess.ShowWindow">ShowWindow</link></td>
</tr>
<tr>
<td><var>suoUseSize</var></td>
<td>Use the specified window sizes</td>
</tr>
<tr>
<td><var>suoUsePosition</var></td>
<td>Use the specified window sizes.</td>
</tr>
<tr>
<td><var>suoUseCountChars</var></td>
<td>Use the specified console character width.</td>
</tr>
<tr>
<td><var>suoUseFillAttribute</var></td>
<td>Use the console fill attribute specified in <link id="TProcess.FillAttribute">FillAttribute</link>.</td>
</tr>
</table>
</descr>
<seealso>
<link id="TProcess.ShowWindow"/>
<link id="TProcess.WindowHeight"/>
<link id="TProcess.WindowWidth"/>
<link id="TProcess.WindowLeft"/>
<link id="TProcess.WindowTop"/>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.WindowRows"/>
<link id="TProcess.FillAttribute"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.Running">
<short>Determines wheter the process is still running.</short>
<descr>
<var>Running</var> can be read to determine whether the process is still
running.
</descr>
<seealso>
<link id="TProcess.Terminate"/>
<link id="TProcess.Active"/>
<link id="TProcess.ExitStatus"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.ShowWindow">
<short>Determines how the process main window is shown (Windows only)</short>
<descr>
<p>
<var>ShowWindow</var> determines how the process' main window is shown. It
is useful only on Windows.
</p>
<table>
<th><td>Option</td><td>Meaning</td></th>
<tr>
<td><var>swoNone</var></td><td>Allow system to position the window.</td>
</tr>
<tr>
<td><var>swoHIDE</var></td><td>The main window is hidden.</td>
</tr>
<tr>
<td><var>swoMaximize</var></td><td>The main window is maximized.</td>
</tr>
<tr>
<td><var>swoMinimize</var></td><td>The main window is minimized.</td>
</tr>
<tr>
<td><var>swoRestore</var></td><td>Restore the previous position.</td>
</tr>
<tr>
<td><var>swoShow</var></td><td>Show the main window.</td>
</tr>
<tr>
<td><var>swoShowDefault</var></td><td>When showing Show the main window on a default position</td>
</tr>
<tr>
<td><var>swoShowMaximized</var></td><td>The main window is shown maximized</td>
</tr>
<tr>
<td><var>swoShowMinimized</var></td><td>The main window is shown minimized</td>
</tr>
<tr>
<td><var>swoshowMinNOActive</var></td><td>The main window is shown minimized but not activated</td>
</tr>
<tr>
<td><var>swoShowNA</var></td><td>The main window is shown but not activated</td>
</tr>
<tr>
<td><var>swoShowNoActivate</var></td><td>The main window is shown but not activated</td>
</tr>
<tr>
<td><var>swoShowNormal</var></td><td>The main window is shown normally</td>
</tr>
</table>
</descr>
<seealso>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.WindowColumns">
<short>Number of columns in console window (windows only)</short>
<descr>
<var>WindowColumns</var> is the number of columns in the console window, used
to run the command in. This property is only effective if
<var>suoUseCountChars</var> is specified in
<link id="TProcess.StartupOptions">StartupOptions</link>
</descr>
<seealso>
<link id="TProcess.WindowHeight"/>
<link id="TProcess.WindowWidth"/>
<link id="TProcess.WindowLeft"/>
<link id="TProcess.WindowTop"/>
<link id="TProcess.WindowRows"/>
<link id="TProcess.FillAttribute"/>
<link id="TProcess.StartupOptions"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.WindowHeight">
<short>Height of the process main window</short>
<descr>
<var>WindowHeight</var> is the initial height (in pixels) of the process' main
window. This property is only effective if
<var>suoUseSize</var> is specified in
<link id="TProcess.StartupOptions">StartupOptions</link>
</descr>
<seealso>
<link id="TProcess.WindowWidth"/>
<link id="TProcess.WindowLeft"/>
<link id="TProcess.WindowTop"/>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.WindowRows"/>
<link id="TProcess.FillAttribute"/>
<link id="TProcess.StartupOptions"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.WindowLeft">
<short>X-coordinate of the initial window (Windows only)</short>
<descr>
<var>WindowLeft</var> is the initial X coordinate (in pixels) of the process'
main window, relative to the left border of the desktop.
This property is only effective if <var>suoUsePosition</var> is
specified in <link id="TProcess.StartupOptions">StartupOptions</link>
</descr>
<seealso>
<link id="TProcess.WindowHeight"/>
<link id="TProcess.WindowWidth"/>
<link id="TProcess.WindowTop"/>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.WindowRows"/>
<link id="TProcess.FillAttribute"/>
<link id="TProcess.StartupOptions"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.WindowRows">
<short>Number of rows in console window (Windows only)</short>
<descr>
<var>WindowRows</var> is the number of rows in the console window, used
to run the command in. This property is only effective if
<var>suoUseCountChars</var> is specified in
<link id="TProcess.StartupOptions">StartupOptions</link>
</descr>
<seealso>
<link id="TProcess.WindowHeight"/>
<link id="TProcess.WindowWidth"/>
<link id="TProcess.WindowLeft"/>
<link id="TProcess.WindowTop"/>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.FillAttribute"/>
<link id="TProcess.StartupOptions"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.WindowTop">
<short>Y-coordinate of the initial window (Windows only)</short>
<descr>
<var>WindowTop</var> is the initial Y coordinate (in pixels) of the process'
main window, relative to the top border of the desktop.
This property is only effective if <var>suoUsePosition</var> is
specified in <link id="TProcess.StartupOptions">StartupOptions</link>
</descr>
<seealso>
<link id="TProcess.WindowHeight"/>
<link id="TProcess.WindowWidth"/>
<link id="TProcess.WindowLeft"/>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.WindowRows"/>
<link id="TProcess.FillAttribute"/>
<link id="TProcess.StartupOptions"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.WindowWidth">
<short>Height of the process main window (Windows only)</short>
<descr>
<var>WindowWidth</var> is the initial width (in pixels) of the process' main
window. This property is only effective if
<var>suoUseSize</var> is specified in
<link id="TProcess.StartupOptions">StartupOptions</link>
</descr>
<seealso>
<link id="TProcess.WindowHeight"/>
<link id="TProcess.WindowLeft"/>
<link id="TProcess.WindowTop"/>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.WindowRows"/>
<link id="TProcess.FillAttribute"/>
<link id="TProcess.StartupOptions"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.FillAttribute">
<short>Color attributes of the characters in the console window (Windows only)</short>
<descr>
<var>FillAttribute</var> is a WORD value which specifies the background and
foreground colors of the console window.
</descr>
<seealso>
<link id="TProcess.WindowHeight"/>
<link id="TProcess.WindowWidth"/>
<link id="TProcess.WindowLeft"/>
<link id="TProcess.WindowTop"/>
<link id="TProcess.WindowColumns"/>
<link id="TProcess.WindowRows"/>
<link id="TProcess.StartupOptions"/>
</seealso>
</element>
<element name="TProcess.CloseInput">
<short>Close the input stream of the process</short>
<descr>
<var>CloseInput</var> closes the input file descriptor of the process, that
is, it closes the handle of the pipe to standard input of the process.
</descr>
<seealso>
<link id="TProcess.Input">Input</link>
<link id="TProcess.StdErr">StdErr</link>
<link id="TProcess.Output">Output</link>
<link id="TProcess.CloseOutput">CloseOutput</link>
<link id="TProcess.CloseStdErr">CloseStdErr</link>
</seealso>
</element>
<element name="TProcess.CloseOutput">
<short>Close the output stream of the process</short>
<descr>
<var>CloseOutput</var> closes the output file descriptor of the process, that
is, it closes the handle of the pipe to standard output of the process.
</descr>
<seealso>
<link id="TProcess.Output">Output</link>
<link id="TProcess.Input">Input</link>
<link id="TProcess.StdErr">StdErr</link>
<link id="TProcess.CloseInput">CloseInput</link>
<link id="TProcess.CloseStdErr">CloseStdErr</link>
</seealso>
</element>
<element name="TProcess.CloseStderr">
<short>Close the error stream of the process</short>
<descr>
<var>CloseStdErr</var> closes the standard error file descriptor of the process, that
is, it closes the handle of the pipe to standard error output of the process.
</descr>
<seealso>
<link id="TProcess.Output">Output</link>
<link id="TProcess.Input">Input</link>
<link id="TProcess.StdErr">StdErr</link>
<link id="TProcess.CloseInput">CloseInput</link>
<link id="TProcess.CloseStdErr">CloseStdErr</link>
</seealso>
</element>
<element name="TProcess.OnForkEvent">
<short>Event triggered after fork occurred on Linux</short>
<descr>
<var>OnForkEvent</var> is triggered after the <link
id="#rtl.baseunix.fpfork">fpFork</link>call in the child process.
It can be used to e.g. close file descriptors and make changes to other
resources before the <link id="#rtl.baseunix.fpexecv">fpexecv</link> call.
This event is not used on windows.
</descr>
<seealso>
<link id="TProcess.Output">Output</link>
<link id="TProcess.Input">Input</link>
<link id="TProcess.StdErr">StdErr</link>
<link id="TProcess.CloseInput">CloseInput</link>
<link id="TProcess.CloseStdErr">CloseStdErr</link>
<link id="TProcessForkEvent"/>
</seealso>
</element>
<element name="TProcessForkEvent">
<short>Prototype for <var>TProcess.OnForkEvent</var> event handler</short>
<descr>
<var>TProcessForkEvent</var> is the prototype for <link
id="TProcess.OnForkEvent"/>. It is a simple procedure, as the idea is that
only process-global things should be performed in this event handler.
</descr>
<seealso>
<link id="TProcess.OnForkEvent"/>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.Executable">
<short>Executable name. Supersedes <var>CommandLine</var> and <var>ApplicationName</var>.</short>
<descr>
<p>
<var>Executable</var> is the name of the executable to start. It should not
contain any command-line arguments. If no path is given, it will be searched
in the <var>PATH</var> environment variable.
</p>
<p>
The extension must be given, none will be added by the component itself. It
may be that the OS adds the extension, but this behaviour is not guaranteed.
</p>
<p>
Arguments should be passed in <link id="TProcess.Parameters"/>.
</p>
<p>
<var>Executable</var> supersedes the <link id="TProcess.CommandLine"/> and <link id="TProcess.ApplicationName"/>
properties, which have been deprecated. However, if either of
<var>CommandLine</var> or <var>ApplicationName</var> is specified, they will
be used instead of <var>Executable</var>.
</p>
</descr>
<seealso>
<link id="TProcess.CommandLine">CommandLine</link>
<link id="TProcess.ApplicationName">ApplicationName</link>
<link id="TProcess.Parameters">Parameters</link>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.Parameters">
<short>Command-line argumens. Supersedes <var>CommandLine</var>.</short>
<descr>
<p>
<var>Parameters</var> contains the command-line arguments that should be passed
to the program specified in <link id="TProcess.Executable">Executable</link>.
</p>
<p>
Commandline arguments should be specified one per item in
<var>Parameters</var>: each item in <var>Parameters</var> will be passed as
a separate command-line item. It is therefor not necessery to quote whitespace
in the items. As a consequence, it is not allowed to specify multiple
command-line parameters in 1 item in the stringlist. If a command needs 2
options <var>-t</var> and <var>-s</var>, the following is not correct:
</p>
<code>
With Parameters do
begin
add('-t -s');
end;
</code>
<p>
Instead, the code should read:
</p>
<code>
With Parameters do
begin
add('-t');
Add('-s');
end;
</code>
<remark>
Note that <var>Parameters</var> is ignored if either of
<var>CommandLine</var> or <var>ApplicationName</var> is specified. It
can only be used with <var>Executable</var>.
</remark>
<remark>
The idea of using <var>Parameters</var> is that they are passed unmodified to
the operating system. On Windows, a single command-line string must be
constructed, and each parameter is surrounded by double quote characters if
it contains a space. The programmer must not quote parameters with spaces.
</remark>
</descr>
<seealso>
<link id="TProcess.Executable">Executable</link>
<link id="TProcess.CommandLine">CommandLine</link>
<link id="TProcess.ApplicationName">ApplicationName</link>
</seealso>
</element>
<!-- property Visibility: published -->
<element name="TProcess.XTermProgram">
<short>XTerm program to use (unix only)</short>
<descr>
<p> <var>XTermProgram</var> can be used to specify the console program to use
when <var>poConsole</var> is specified in <link id="TProcess.Options"/>.
</p>
<p>
If none is specified, <link id="DetectXTerm"/> is used to detect the
terminal program to use.
the list specified in <var>TryTerminals</var> is
tried. If none is found, then the <var>DESKTOP_SESSION</var> environment
variable is examined:
</p>
<dl>
<dt>kde</dt><dd>konsole is used if it is found.</dd>
<dt>gnome</dt><dd>gnome-terminal is used if it is found</dd>
<dt>windowmaker</dt><dd>aterm or xterm are used if found.</dd>
</dl>
<p>
If after all this, no terminal is found, then a list of default programs is
tested: 'x-terminal-emulator','xterm','aterm','wterm','rxvt'.
</p>
</descr>
<seealso>
<link id="TProcess.Options"/>
<link id="DetectXTerm"/>
</seealso>
</element>
<!-- variable Visibility: default -->
<element name="TryTerminals">
<short>A list of terminal programs to use (unix only)</short>
<descr>
<var>TryTerminals</var> is used under unix to test for available terminal
programs in the <link id="DetectXTerm"/> function.
If <link id="XTermProgram"/> is empty, each item in this list will be searched
in the path, and used as a terminal program if it was found.
</descr>
<seealso>
<link id="XTermProgram"/>
<link id="DetectXTerm"/>
</seealso>
</element>
<!-- variable Visibility: default -->
<element name="XTermProgram">
<short>Default XTerm program to use</short>
<descr>
<var>XTermProgram</var> is the terminal program that is used. If empty, it
will be set the first time <link id="DetectXTerm"/> is called.
</descr>
<seealso>
<link id="TryTerminals"/>
<link id="DetectXTerm"/>
</seealso>
</element>
<!-- function Visibility: default -->
<element name="DetectXTerm">
<short>Detect the terminal program.</short>
<descr>
<p>
<var>DetectXTerm</var> checks if <link id="XTermProgram"/> is set. if so, it
returns that. If <var>XTermProgram</var> is empty, the list specified in
<link id="TryTerminals"/> is tested for existence.
If none is found, then the <var>DESKTOP_SESSION</var> environment variable is examined:
</p>
<dl>
<dt>kde</dt><dd>konsole is used if it is found.</dd>
<dt>gnome</dt><dd>gnome-terminal is used if it is found</dd>
<dt>windowmaker</dt><dd>aterm or xterm are used if found.</dd>
</dl>
<p>
If after all this, no terminal is found, then a list of default programs is
tested: 'x-terminal-emulator','xterm','aterm','wterm','rxvt'.
</p>
<p>
If a terminal program is found, then it is saved in <var>XTermProgram</var>,
so the next call to <var>DetectXTerm</var> will re-use the value. If the
search must be performed again, it is sufficient to set
<var>XTermProgram</var> to the empty string.
</p>
</descr>
<seealso>
<link id="XTermProgram"/>
<link id="TryTerminals"/>
<link id="TProcess.XTermProgram"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="DetectXTerm.Result">
<short>The terminal program to use, or empty if none was found.</short>
</element>
<!-- property Visibility: published -->
<element name="TProcess.PipeBufferSize">
<short>Buffer size to be used when using pipes</short>
<descr>
<var>PipeBufferSize</var> indicates the buffer size used when creating pipes
(when <var>soUsePipes</var> is specified in <var>Options</var>). This option
is not respected on all platforms (currently only Windows uses this).
</descr>
<seealso>
<link id="#fcl.pipes.CreatePipeHandles"/>
</seealso>
</element>
<!-- procedure Visibility: default -->
<element name="CommandToList">
<short>Convert a command-line to a list of command options</short>
<descr>
<var>CommandToList</var> splits the string <var>S</var> in command-line arguments that are
returned, one per item, in the <var>List</var> stringlist.
Command-line arguments are separated by whitespace (space, tab, CR and LF characters).
If an argument needs to contain a space character, it can be surrounded in quote characters
(single or double quotes).
</descr>
<errors>
There is currently no way to specify a quote character inside a quoted argument.
</errors>
<seealso>
<link id="TProcess.CommandLine"/>
</seealso>
</element>
<!-- argument Visibility: default -->
<element name="CommandToList.S">
<short>String to split up</short>
</element>
<!-- argument Visibility: default -->
<element name="CommandToList.List">
<short>List of command-line arguments, one per item</short>
</element>
<!-- function Visibility: default -->
<element name="RunCommandIndir">
<short>Run a command in a specific directory.</short>
<descr>
<p>
<var>RunCommandInDir</var> will execute binary <var>exename</var> with
command-line options <var>commands</var>, setting <var>curdir</var> as the
current working directory for the command.
The output of the command is captured, and returned in the string <var>OutputString</var>.
The function waits for the command to finish, and returns <var>True</var> if the command
was started succesfully, <var>False</var> otherwise.
</p>
<p>
If a <var>ExitStatus</var> parameter is specified the exit status of the command is
returned in this parameter.
</p>
<p>
The version using <var>cmdline</var> attempts to split the command line in a
binary and separate command-line arguments. This version of the function is deprecated.
</p>
</descr>
<errors>
On error, <var>False</var> is returned.
</errors>
<seealso>
<link id="TProcess"/>
<link id="RunCommand"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="RunCommandIndir.Result">
<short>True if the command was started succesfully.</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommandIndir.curdir">
<short>Current working directory for the command.</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommandIndir.exename">
<short>Executable to start.</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommandIndir.commands">
<short>Command-line arguments for the executable.</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommandIndir.outputstring">
<short>String to return the commands output.</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommandIndir.exitstatus">
<short>On exit, contains the exit status of the process</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommandInDir.cmdline">
<short>Filename of binary to start plus command-line arguments separated by whitespace</short>
</element>
<!-- function Visibility: default -->
<element name="RunCommand">
<short>Execute a command in the current working directory</short>
<descr>
<var>RunCommand</var> runs <link id="RunCommandInDir"/> with an empty current working directory.
</descr>
<seealso>
<link id="RunCommandInDir"/>
</seealso>
</element>
<!-- function result Visibility: default -->
<element name="RunCommand.Result">
<short>True if the function executed succesfully</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommand.exename">
<short>Binary to start.</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommand.commands">
<short>Command-line arguments</short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommand.outputstring">
<short>String containing the output of the process. </short>
</element>
<!-- argument Visibility: default -->
<element name="RunCommand.cmdline">
<short>Filename of ninary to start and command-line arguments, separated by whitespace.</short>
</element>
</module> <!-- process -->
</package>
</fpdoc-descriptions>
|