Difference between revisions of "Manual:DIL Manual/shell()"

From DikuMUD Wiki
Jump to navigation Jump to search
(Created page with "= integer shell(str : string); = str : The system command to execute and its parameters. result : Will return 0 if a thread is successfully created. You won't know...")
 
 
Line 11: Line 11:
 
If rc is zero then the thread was created successfully. But you wont know if the binary
 
If rc is zero then the thread was created successfully. But you wont know if the binary
 
was executed (the server doesn't wait for it to finish).
 
was executed (the server doesn't wait for it to finish).
 +
 +
Using shell() you cannot directly execute any commands outside the allow/ directory.

Latest revision as of 09:44, 14 January 2021

integer shell(str : string);

 str     : The system command to execute and its parameters.
 result  : Will return 0 if a thread is successfully created. You won't know if the system command succeeded.

Examples

 rc := shell("gh --subject hello");

This command would execute the vme/bin/allow/gh binary with the parameters shown above. If rc is zero then the thread was created successfully. But you wont know if the binary was executed (the server doesn't wait for it to finish).

Using shell() you cannot directly execute any commands outside the allow/ directory.