DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

latch_unlink(S)


latch_unlink -- remove latch from the system

Syntax

cc . . . -lsuds
#include <latch.h>

int latch_unlink(const char *name);

Description

The latch_unlink function is used to remove the latch named by name. If name is currently referenced by other processes, then latch_unlink has no effect on the state of the latch. If one or more processes have the latch open when latch_unlink is called, destruction of the latch is postponed until all references to it have been destroyed by calls to latch_close(S), _exit(S), or exec(S). Calls to latch_open(S), to re-create or re-connect to the latch, refer to a new latch after latch_unlink is called. latch_unlink does not block until all references have been destroyed; it returns immediately.

Return values

Upon successful completion, the function returns zero. Otherwise the latch is not changed by this function call and the function returns -1 with errno set to indicate the error.

Diagnostics

Errors returned are as for sem_unlink(S).

See also

latch_close(S), latch_getvalue(S), latch_open(S), latch_post(S), latch_trywait(S), latch_wait(S), sem_unlink(S)

Standards conformance

latch_unlink is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003