set_exit_status


Description:

[ Version ( since = "2.28" ) ]
public void set_exit_status (int exit_status)

Sets the exit status that will be used when the invoking process exits.

The return value of the command_line signal is passed to this function when the handler returns. This is the usual way of setting the exit status.

In the event that you want the remote invocation to continue running and want to decide on the exit status in the future, you can use this call. For the case of a remote invocation, the remote process will typically exit when the last reference is dropped on this. The exit status of the remote process will be equal to the last value that was set with this function.

In the case that the commandline invocation is local, the situation is slightly more complicated. If the commandline invocation results in the mainloop running (ie: because the use-count of the application increased to a non-zero value) then the application is considered to have been 'successful' in a certain sense, and the exit status is always zero. If the application use count is zero, though, the exit status of the local ApplicationCommandLine is used.

Parameters:

this

a ApplicationCommandLine

exit_status

the exit status




2022 vala-language.org