Forum > General

Ways to execute external program/process

(1/1)

mvampire:
Hello. I'm interested to know all ways, how to execute external process in Unix...

I've found 6 ways:
1) TProcess (http://wiki.freepascal.org/Executing_External_Programs)
2) SysUtils.ExecuteProcess (http://wiki.freepascal.org/Executing_External_Programs)
3) fpsystem (http://wiki.freepascal.org/Console_Mode_Pascal#Execute_shell_command)
4) POpen (http://www.freepascal.org/docs-html/rtl/unix/popen.html)
5) Shell (http://www.freepascal.org/docs-html/rtl/unix/shell.html)
6) FpExecve (http://www.freepascal.org/docs-html/rtl/baseunix/fpexecve.html)

I also want to manage output of the executed process but with TProcess my program hangs with large output... And I don't like the way offered in http://wiki.freepascal.org/Executing_External_Programs.

marcov:

--- Quote from: mvampire on September 09, 2010, 05:32:07 pm ---Hello. I'm interested to know all ways, how to execute external process in Unix...

Till now I've found only 3:
1) TProcess (http://wiki.freepascal.org/Executing_External_Programs)

2) SysUtils.ExecuteProcess (http://wiki.freepascal.org/Executing_External_Programs)
3) fpsystem (http://wiki.freepascal.org/Console_Mode_Pascal#Execute_shell_command)

I also want to manage output of the executed process but with TProcess my program hangs with large output... And I don't like the way offered in http://wiki.freepascal.org/Executing_External_Programs.

--- End quote ---

Use tprocess, it should work. If there is a problem, create a reproducable situation and file a bug.

mvampire:
Ok, thanks.
I've anyway found several more ways - I'll add them now to the first post.

Navigation

[0] Message Index

Go to full version