Error Creating Semaphore Set For Ipc Key
PKI Service Identity Access Manager Shop Online Cyber Security Services Managed Security Services DeepSight Intelligence Incident Response Security Simulation Website Security SSL Certificates Complete Website Security Code Signing Certificates Norton Shopping Guarantee Buy SSL Products A-Z Services Services Home Business Critical Services Consulting Services Customer Success Services Cyber Security Services Education Services Solutions Solutions Home Topics Encryption Everywhere Internet of Things Next Generation Endpoint Office 365 Industries Automotive Cyber Insurance Education Financial Services Global Service Providers Industrial Control Systems Healthcare Retail Government Federal Government State & Local Support Center Technical Support Symantec Connect Buying Programs Upgrades Maintenance & Renewals Training Security Center Security Center Home Blogs ISTR Threats Virus Definitions and Security Updates Removal Tools Partner Find a Partner Become a Partner Login Required Login into Partner Portal Partner Licensing Partner Renewals Partner Training Margin Builder Opportunity Registration Financial Benefits English 中文(简体) 中文(繁體) Česká English Français Deutsch Magyar Italiano 日本語 한국어 Polski Português Pусский Español Site: Symantec Enterprise Small Business Norton United States Search Support Home Support Home MySymantec Licensing Products A-Z SYM16-015 Security Advisory Login Profile Subscriptions Logout Login Forgot Password? Don't have a SymAccount? Create a SymAccount now!' error creating semaphore set for IPC key TECH157892 May 6th, 2011 http://www.symantec.com/docs/TECH157892 Support / error creating semaphore set for IPC key Did this article resolve your issue? Thank you for your feedback! Provide feedback on this article Request Assistance Print Article Products Subscribe to this Article Manage your Subscriptions Search Again Situation When you try to run a policy on a Unix/Linux agent you get
semget ( key_t key, int nsems, int semflg ); RETURNS: semaphore set IPC identifier on success -1 on error: errno = EACCESS (permission denied) EEXIST (set exists, cannot create (IPC_EXCL)) EIDRM (set is marked for deletion) ENOENT (set does not exist, no http://www.tldp.org/LDP/lpg/node51.html IPC_CREAT was used) ENOMEM (Not enough memory to create new set) ENOSPC (Maximum set limit exceeded) NOTES: The first argument to semget() is the key value (in our case returned by a call to ftok()). This key value is then compared to existing key values that exist within the kernel for other semaphore sets. At that point, the open or access operation is dependent upon the contents of the semflg argument. IPC_CREAT Create the semaphore set if it doesn't already error creating exist in the kernel. IPC_EXCL When used with IPC_CREAT, fail if semaphore set already exists. If IPC_CREAT is used alone, semget() either returns the semaphore set identifier for a newly created set, or returns the identifier for a set which exists with the same key value. If IPC_EXCL is used along with IPC_CREAT, then either a new set is created, or if the set exists, the call fails with -1. IPC_EXCL is useless by itself, but when combined error creating semaphore with IPC_CREAT, it can be used as a facility to guarantee that no existing semaphore set is opened for access. As with the other forms of System V IPC, an optional octal mode may be OR'd into the mask to form the permissions on the semaphore set. The nsems argument specifies the number of semaphores that should be created in a new set. This represents the number of printers in our fictional print room described earlier. The maximum number of semaphores in a set is defined in ``linux/sem.h'' as: #define SEMMSL 32 /* <=512 max num of semaphores per id */ Note that the nsems argument is ignored if you are explicitly opening an existing set. Let's create a wrapper function for opening or creating semaphore sets: int open_semaphore_set( key_t keyval, int numsems ) { int sid; if ( ! numsems ) return(-1); if((sid = semget( mykey, numsems, IPC_CREAT | 0660 )) == -1) { return(-1); } return(sid); } Note the use of the explicit permissions of 0660. This small function either returns a semaphore set identifier (int), or -1 on error. The key value must be passed to it, as well as the number of semaphores to allocate space for if creating a new set. In the example presented at the end of this section, notice the use of the IPC_EXCL flag to determine whether or not the semaphore set exists or not. Next: SYSTEM CAL