HP DCE/9000 Application Development Tools for HP-UX 11i Release Note

24
HP DCE/9000 Version 1.8 Application Development Tools for HP-UX 11i Release Note
Developing DCE Applications with HP DCE/9000
On the server side, the only supported behavior is for a server thread to fork and exec, with
no use of RPC in the child of the fork until after the exec.
File Locking
The HP DCE Threads fcntl() wrapper does not provide for thread-synchronous file locking.
The entire process will block when a call to fcntl() specifies F_SETLKW and the file is
currently locked by another process.
Note also that HP-UX file locks are a process-wide resource. For this reason, if multiple
threads call fcntl() to lock the same section of a file, all the calls will succeed, and each thread
will believe it holds the lock. However, only a single, process-wide lock is actually obtained —
the first call obtains the lock, the second and subsequent calls have no effect. If one thread
releases this lock, the other threads will continue to believe the file is locked, when in fact the
process no longer holds any lock on that section of the file.
Use mutex locks to ensure that only one thread at a time locks a particular file or section of a
file.
The previous comments regarding file locking with fcntl() also apply to lockf(). lockf() is not
wrapped by DCE Threads.
sec_id_parse_name()
CAUTION In previous HP DCE releases, the sec_id_parse_name() library call could be
passed a NULL pointer or null string for the global principal name and would
return the local cell name. This behavior was maintained in HP DCE 1.6, but is
not supported in HP DCE 1.7. Instead, pass " /.:" to obtain this result.
sec_login_valid_and_cert_ident()
The sec_login_valid_and_cert_ident() routine uses fcntl() for file locking, and should not
be called by more than one thread at a time. If you must use
sec_login_valid_and_cert_ident() in multiple threads, use a mutex to insure that only one
thread at a time executes the call. No HP DCE programming interfaces call
sec_login_valid_and_cert_ident() internally.
Applications that need to obtain credentials in multiple threads will generally only need to
call sec_login_validate_identity(), which is not affected by fcntl().
semop()
The HP DCE Threads semop() will not increment the
semncnt
or
semzcnt
kernel variables.