Function

FwupdPlugincommon_spawn_sync

Declaration [src]

gboolean
fu_common_spawn_sync (
  const gchar* const* argv,
  FuOutputHandler handler_cb,
  gpointer handler_user_data,
  guint timeout_ms,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Runs a subprocess and waits for it to exit. Any output on standard out or standard error will be forwarded to handler_cb as whole lines.

Available since:0.9.7

Parameters

argv const gchar* const*
 

The argument list to run.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
handler_cb FuOutputHandler
 

Optional FuOutputHandler.

handler_user_data gpointer
 

The user data to pass to handler_cb.

timeout_ms guint
 

A timeout in ms, or 0 for no limit.

cancellable GCancellable*
 

Optional GCancellable.

 The argument can be NULL.
 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE for success.