---
name: "gearman_job_function_name"
section: "3"
platform: "linux"
package: "gearmand"
version: "2.2.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gearman_job_function_name"
---

# gearman\_job\_function\_name(3)

Gearmand Documentation, https://gearman.org/gearmand/

## NAME

gearman\_job\_function\_name - Gearmand Documentation, https://gearman.org/gearmand/

## SYNOPSIS

\#include \<libgearman/gearman.h\>

- **type gearman\_job\_st**

  - **void gearman\_job\_free(*gearman\_job\_st* \*job)**

  - ***gearman\_return\_t* gearman\_job\_send\_data(*gearman\_job\_st* \*job, const void \*data, *size\_t* data\_size)**

  - ***gearman\_return\_t* gearman\_job\_send\_warning(*gearman\_job\_st* \*job, const void \*warning, *size\_t* warning\_size)**

  - ***gearman\_return\_t* gearman\_job\_send\_status(*gearman\_job\_st* \*job, *uint32\_t* numerator, *uint32\_t* denominator)**

  - ***gearman\_return\_t* gearman\_job\_send\_complete(*gearman\_job\_st* \*job, const void \*result, *size\_t* result\_size)**

  - ***gearman\_return\_t* gearman\_job\_send\_exception(*gearman\_job\_st* \*job, const void \*exception, *size\_t* exception\_size)**

  - ***gearman\_return\_t* gearman\_job\_send\_fail(*gearman\_job\_st* \*job)**

  - **const char \*gearman\_job\_handle(const *gearman\_job\_st* \*job)**

  - **const char \*gearman\_job\_function\_name(const *gearman\_job\_st* \*job)**

  - **const char \*gearman\_job\_unique(const *gearman\_job\_st* \*job)**

  - **const void \*gearman\_job\_workload(const *gearman\_job\_st* \*job)**

  - ***size\_t* gearman\_job\_workload\_size(const *gearman\_job\_st* \*job)**

  - **void \*gearman\_job\_take\_workload(*gearman\_job\_st* \*job, *size\_t* \*data\_size)**

  - ***gearman\_client\_st* \*gearman\_job\_use\_client(*gearman\_job\_st* \*job)**

  Link with -lgearman

## DESCRIPTION

*gearman\_job\_st* are passed to worker functions to represent jobs that are being run by *gearman\_worker\_work()*.

*gearman\_job\_free()* is used to free a job. This only needs to be done if a task was created with a preallocated structure.

*gearman\_job\_handle()* returns the job handle(see *gearman\_job\_handle\_t* for more information).

*gearman\_job\_function\_name()* return the name of the function that the job was set to execute against.

*gearman\_job\_unique()* return the unique value that was used for *gearman\_job\_st*.

gearman\_job\_take\_workload returns the *gearman\_job\_st* workload. The size of it can be determined with *gearman\_job\_workload\_size()*. *gearman\_job\_take\_workload()* is the same as *gearman\_job\_workload()* with the exception that the result must be **[free(3)](/free/3.md)** by the caller.

gearman\_job\_use\_client returns a *gearman\_client\_st* configured from gearman\_job\_st. The gearman\_client\_st can be used to communicate client API commands to the server. You do not, and should not, call *gearman\_client\_free()* on the gearman\_client\_st. It is cleaned up when job is cleaned up.

## RETURN VALUE

A value of *gearman\_return\_t*  is returned.  On success that value will be :c:type::*GEARMAN\_SUCCESS*.  Use *gearman\_strerror()* to translate this value to a printable string.

## HOME

To find out more information please check: *https://gearman.org/gearmand/*

## SEE ALSO

**[gearmand(8)](/gearmand/8.md)** **[libgearman(3)](/libgearman/3.md)**

## AUTHOR

Data Differential http://www.datadifferential.com/

## COPYRIGHT

2011-2014, Data Differential, http://www.datadifferential.com/
