GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
AG_EXECUTE(3) FreeBSD Library Functions Manual AG_EXECUTE(3)

AG_Execute
agar file execution interface

#include <agar/core.h>

The AG_Execute() function provides a cross-platform interface for executing external applications.

AG_ProcessID
AG_Execute(const char *file, char **argv);


AG_ProcessID
AG_WaitOnProcess(AG_ProcessID pid, enum ag_exec_wait_type wait_type);


int
AG_Kill(AG_ProcessID pid);

The AG_Execute() function executes the specified file with the given arguments, returning an integer process ID. If an error occured, the function returns -1 and sets an error message accordingly.

AG_WaitOnProcess() checks for status or waits until the specified process terminates. The wait_type argument may be one of:

AG_EXEC_WAIT_IMMEDIATE
If the process has not exited, return immediately without blocking.
AG_EXEC_WAIT_INFINITE
Block the calling thread until the process has exited.

The function returns the PID of the terminated process, -1 if an error occured, or 0 if wait_type is AG_EXEC_WAIT_IMMEDIATE and the process is still running.

The AG_Kill() function immediately terminates the specified process.

AG_Intro(3)

The AG_Execute interface first appeared in Agar 1.4.1.
August 15, 2010 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.