efl/src/lib/ecore/efl_exe.eo

95 lines
3.3 KiB
Plaintext

enum @beta Efl.Exe_Signal {
[[Signal is a notification, a message sent by either operating system or some application to our program.
Signals are a mechanism for one-way asynchronous notifications. A signal may be sent from the kernel to
a process, from a process to another process, or from a process to itself. Signal typically alert a
process to some event, such as a segmentation fault, or the user pressing Ctrl-C.]]
int, [[Terminal interrupt.]]
quit, [[Terminal quit.]]
term, [[Termination.]]
kill, [[Kill(can't be caught or ignored).]]
cont, [[Continue executing, if stopped.]]
stop, [[Stop executing(can't be caught or ignored).]]
hup, [[Hangup.]]
usr1, [[User defined signal 1.]]
usr2 [[User defined signal 2.]]
}
enum @beta Efl.Exe_Flags {
[[Flags to customize process behavior.]]
none = 0, [[No special flags.]]
group_leader = 1, [[Process will be executed in its own session.]]
hide_io = 4, [[All console IO will be hidden.]]
term_with_parent = 8, [[Makes child receive SIGTERM when parent dies.]]
}
class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line
{
[[This is a specialized @Efl.Task which abstracts an operating system process.
This class provides a way to start a task by running an executable file (specified using the
@Efl.Core.Command_Line interface) and further customize its execution flags (@.exe_flags) and
environment variables (@.env).
It also allows communicating with the process through signals (@.signal).
]]
methods {
signal {
[[Send a signal to this process.]]
params {
sig: Efl.Exe_Signal; [[Signal number to send.]]
}
}
@property exe_flags {
[[Customize the process' behavior.]]
set { }
get { }
values {
flags: Efl.Exe_Flags; [[Flags.]]
}
}
@property exit_signal {
[[The signal this process emitted upon exiting, if any.]]
get { }
values {
sig: int; [[The exit signal, or -1 if no exit signal happened.]]
}
}
@property pid {
[[The pid of the process, which is only accessible after the object has been finalized.
@since 1.24
]]
get { }
values {
pid: int; [[The pid, or 0 on failure.]]
}
}
@property env {
[[If $env is $NULL then the process created by this object is
going to inherit the environment of this process.
In case $env is not $NULL then the environment variables declared
in this object will represent the environment passed to the new process.
]]
get {
}
set {
}
values {
env : Efl.Core.Env; [[$env will be referenced until this object does not need it anymore.]]
}
}
}
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Efl.Task.priority { get; set; }
Efl.Task.run;
Efl.Task.end;
Efl.Io.Closer.close;
Efl.Io.Closer.closed { get; }
Efl.Io.Reader.read;
Efl.Io.Reader.can_read { get; set; }
Efl.Io.Reader.eos { get; set; }
Efl.Io.Writer.write;
Efl.Io.Writer.can_write { get; set; }
}
}