Sponsored Content
Full Discussion: change semaphore perm
Top Forums Programming change semaphore perm Post 302075850 by matrixmadhan on Wednesday 7th of June 2006 07:46:37 AM
Old 06-07-2006
is it that you want to change the permissions of the sem ?

change it that at the time of sem_creation itself !!!!

or is it that you want to change the perms once it is created ???
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

semaphore

hi, is there any command where we can monitor semaphores? (1 Reply)
Discussion started by: yls177
1 Replies

2. UNIX for Dummies Questions & Answers

find -perm query

I was going through a find tutorial and just couldn't get it...can someone explain it like he/she would explain a brain damaged dodo? "find allows you to specify a pattern that can be bit-wise ANDed with the permissions of the file. Simply put a minus sign before the octal value. The group write... (1 Reply)
Discussion started by: napolayan
1 Replies

3. Shell Programming and Scripting

perm bits

hi, in other previous post, someone suggested to set the " perm bits " to lock the file such that preventing others write to that same file, could someone please explain exactly what is perm bits and how can I achieve the desired result? Thanks! (1 Reply)
Discussion started by: mpang_
1 Replies

4. Shell Programming and Scripting

Wild card in find perm

Hi, Is there a way to use find command to list the directories for certain permissions. I know we can use find . -type d -perm nnn, where nnn is the permission number . However I wold like to know if I wanna search for wild card permissions i.e 75* / 7* / 55* , as i do not know the actual... (1 Reply)
Discussion started by: braindrain
1 Replies

5. UNIX for Dummies Questions & Answers

File Perm settings

we have a file particular group(say abc) and we have a user(say def) in that group.I created file ram.txt it looked like this.. -rwxr--r-- 1 def abc 10 Oct 16 03:54 ram.txt I changed the owner and group of the file as below -rwxr--r-- 1 kriz test 10 Oct 16 03:58 ram.txt when I log in as... (3 Replies)
Discussion started by: ramkriz
3 Replies

6. Shell Programming and Scripting

Semaphore

Hi, I am looking to use a semaphore for the first time in one of my scripts. I am just wondering if there are any simple examples or tutorials around? I am a beginner so the simpler the better :) Thanks -Jaken (2 Replies)
Discussion started by: Jaken
2 Replies

7. Shell Programming and Scripting

Help with find -perm option

How to find all files for instance that match the permission rwxr*x--- where * is a wildcard which can be optionally asserted but all the others must match? Thanks in advance (7 Replies)
Discussion started by: stevensw
7 Replies

8. Red Hat

Sudo perm to troubleshooting

I am building an access template of what types of commands I will need sudo, to support an installed application and view log files in general what commands are recommended is there a general of what would be useful on Red Hat? (1 Reply)
Discussion started by: NelsonC
1 Replies

9. Solaris

Unable to delete directory even with 777 perm

Hi, I have an 'empty' directory 'tmp' of which I am the owner and 777 permission. But when I try to delete the directory using rmdir or rm command, it gives error. Command prompt snapshot: => uname SunOS ... (4 Replies)
Discussion started by: platinum81
4 Replies

10. UNIX for Dummies Questions & Answers

How to find directory listing from root to all files in tree format with details of perm/own/grp?

Hi, My apologies if my query is already available on this forum but I am new and could not find. I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this? ... (4 Replies)
Discussion started by: 8709711
4 Replies
sem_close(3)						     Library Functions Manual						      sem_close(3)

NAME
sem_close - Deallocates the specified named semaphore (P1003.1b) LIBRARY
Realtime Library (librt.so, librt.a) SYNOPSIS
#include <semaphore.h> int sem_close ( sem_t *sem) ; PARAMETERS
sem References the semaphore to be closed. Use the sem argument returned by the previous call to sem_open. DESCRIPTION
The sem_close function makes a semaphore available for reuse by deallocating any system resources allocated for use by the current process for the named semaphore indicated by sem. If the semaphore has not been removed with a call to sem_unlink, sem_close does not change the current state of the semaphore. If the semaphore has been removed with a call to sem_unlink after the most recent call to sem_open with O_CREAT, the semaphore is no longer available after all processes that opened the semaphore close it. RETURN VALUES
On a successful call, a value of 0 (zero) is returned. Otherwise, a value of -1 is returned and errno is set to indicate that an error occurred. ERRORS
The sem_close function fails under the following condition: [EINVAL] The sem argument is not a valid semaphore descriptor. RELATED INFORMATION
Functions: sem_init(3), sem_open(3), sem_unlink(3) Guide to Realtime Programming delim off sem_close(3)
All times are GMT -4. The time now is 07:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy