Search DaTutorials:  
HOME
Php Tutorials
Articles
Basics
Date and Time
File Manipulations
Forms
Functions
General
Interactivity
MySql
Navigation
News,Shoutboxes and Blogs
Language Structure and Data Types
Searching
Security
String Manipulation
User Information and Stats
Search For a Tutorial
Php Reference

sem_get

(PHP 3>= 3.0.6, PHP 4 , PHP 5)

sem_get -- Get a semaphore id

Description

resource sem_get ( int key [, int max_acquire [, int perm]])

sem_get() returns an id that can be used to access the System V semaphore with the given key. The semaphore is created if necessary using the permission bits specified in perm (defaults to 0666). The number of processes that can acquire the semaphore simultaneously is set to max_acquire (defaults to 1). Actually this value is set only if the process finds it is the only process currently attached to the semaphore.

Returns: A positive semaphore identifier on success, or FALSE on error.

A second call to sem_get() for the same key will return a different semaphore identifier, but both identifiers access the same underlying semaphore.

See also sem_acquire(), sem_release(), and ftok().



Copyright © 2001-2004 The PHP Group
All rights reserved.

     Equity Release | Mortgages | Mobile Phones | Homeowner Loans | Buy Anything On eBay
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp