On Mon, Mar 8, 2010 at 6:43 AM, Cyril Hrubis <[email protected]> wrote: > Hi! >> > Well, it's big enough to hold the string (I'm too lazy to figure out exact >> > maximal length for every possible architecture/compiler) and a few more >> > bytes >> > should not kill anyone... >> >> SEM_NAME_MAX (see >> http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/apis/ipcsemo.htm >> )? >> >> This doesn't appear to exist on older versions of Linux (RHEL 4.6 for >> instance...) >> >> The logic required to determine SEM_NAME_MAX should be easy to grab, >> or you could follow the following logic from the sem_open manpage: >> >> ENAMETOOLONG >> The length of the name argument exceeds {PATH_MAX} or a path- >> name component is longer than {NAME_MAX}. > > My manual dated as 20-02-2009 says just: > > > ENAMETOOLONG > name was too long. > > > And 'man sem_overview' says we should use NAME_MAX - 4 (as on linux, named > semaphores are files created in /dev/shm/ virtual filesystem that starts with > 'sem.' prefix). Is semname declared as 'char semname[NAME_MAX - 4];' okay?
Ok.. -Garrett ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
