09-08-2012
I think in case the group id is found, then id returns '0' else its exit status is '1'.
10 More Discussions You Might Find Interesting
1. Cybersecurity
Hi,
Is it possible that one user belongs to many groups, or the relation of user/group is 1/1?. Thanks
Ramón (2 Replies)
Discussion started by: rsanz
2 Replies
2. Linux
RH 7.2
I'm trying to list the users & groups on my machine. I found the lsuser & lsgroup commands but no associated man pages.
I typed: lsuser
I get --> Valid options are: -a
So I typed: lsuser -a
I get --> Valid options are: groups, home
So I typed: lsuser -a groups
I get -->... (2 Replies)
Discussion started by: jalburger
2 Replies
3. UNIX for Dummies Questions & Answers
hi eveyone i've recently requested my unix admin to create a userid for 2 groups. He created the id and i can see it by grep "id" /etc/group.
But when i login with that id into unix and try to cd that group it says permission denied. something like cd /groupname -- permission denied
Can my admin... (1 Reply)
Discussion started by: sammet
1 Replies
4. UNIX for Dummies Questions & Answers
Is there a way to find out all users and the UNIX groups they belong to??
:) (3 Replies)
Discussion started by: Hangman2
3 Replies
5. Solaris
Hi All,
I would like know how many of default number of users and groups are there in solaris-10...
Regards
Tirupathi Raju (2 Replies)
Discussion started by: tirupathiraju_t
2 Replies
6. Solaris
How do I remove a user from a group? I'm using the usermod command but its not working.
I have a user "abc" who is a member of the groups root and other. I'm trying to remove him from the group "other" (using CLI) which is his secondary group but it's not working.
How do I do this? Is there any... (11 Replies)
Discussion started by: the_red_dove
11 Replies
7. UNIX for Dummies Questions & Answers
Hi
I am new to unix so hopefully someone can help. I need to list all the users I have in my unix enviroment (AIX) and the groups (primary and secondary) they belong to.
Can anyone help?
Many thanks in advance (2 Replies)
Discussion started by: m3y
2 Replies
8. Shell Programming and Scripting
Hi,
I have two little issues:
1) there is possible in sh to create a function who return a boolean value?
2)i have to verify if an user belongs to a group and i think it is needed to create a function which take two parameter and return a boolean value. in fact i have to parse /etc/group... (5 Replies)
Discussion started by: catalint
5 Replies
9. UNIX for Dummies Questions & Answers
Happy Thanksgiving Everyone!! I have a question about adding users to multiple groups. Thanks in advance
Using Red Hat and here are the issues:
Example:
Users:
Bob
Mark
Groups:
SystemsAnalysts
BusinessAnalysts
If I am adding a user Bob to both groups (SystemsAnalysts and... (2 Replies)
Discussion started by: hansokl
2 Replies
10. HP-UX
Hi,
I need to modify the user 'munfai' by adding it into groups bscs, oinstall, dba.
I use this command as user root to add the user into the mentioned groups :
# usermod -G bscs,oinstall,dba munfai
I can thereafter see the id in the groups :
# id munfai
uid=258(munfai) gid=20(users)... (2 Replies)
Discussion started by: anaigini45
2 Replies
EXIT(3) Linux Programmer's Manual EXIT(3)
NAME
exit - cause normal program termination
SYNOPSIS
#include <stdlib.h>
void exit(int status);
DESCRIPTION
The exit() function causes normal program termination and the the value of status & 0377 is returned to the parent (see wait(2)). All
functions registered with atexit() and on_exit() are called in the reverse order of their registration, and all open streams are flushed
and closed. Files created by tmpfile() are removed.
The C standard specifies two defines EXIT_SUCCESS and EXIT_FAILURE that may be passed to exit() to indicate successful or unsuccessful ter-
mination, respectively.
RETURN VALUE
The exit() function does not return.
CONFORMING TO
SVID 3, POSIX, BSD 4.3, ISO 9899 (``ANSI C'')
NOTES
During the exit processing, it is possible to register additional functions with atexit() and on_exit(). Always the last-registered func-
tion is removed from the chain of registered functions, and invoked. It is undefined what happens if during this processing either exit()
or longjmp() is called.
The use of EXIT_SUCCESS and EXIT_FAILURE is slightly more portable (to non-Unix environments) than that of 0 and some nonzero value like 1
or -1. In particular, VMS uses a different convention.
BSD has attempted to standardize exit codes - see the file <sysexits.h>.
After exit(), the exit status must be transmitted to the parent process. There are three cases. If the parent has set SA_NOCLDWAIT, or has
set the SIGCHLD handler to SIG_IGN, the status is discarded. If the parent was waiting on the child it is notified of the exit status. In
both cases the exiting process dies immediately. If the parent has not indicated that it is not interested in the exit status, but is not
waiting, the exiting process turns into a "zombie" process (which is nothing but a container for the single byte representing the exit sta-
tus) so that the parent can learn the exit status when it later calls one of the wait() functions.
If the implementation supports the SIGCHLD signal, this signal is sent to the parent. If the parent has set SA_NOCLDWAIT, it is undefined
whether a SIGCHLD signal is sent.
If the process is a session leader and its controlling terminal the controlling terminal of the session, then each process in the fore-
ground process group of this controlling terminal is sent a SIGHUP signal, and the terminal is disassociated from this session, allowing it
to be acquired by a new controlling process.
If the exit of the process causes a process group to become orphaned, and if any member of the newly-orphaned process group is stopped,
then a SIGHUP signal followed by a SIGCONT signal will be sent to each process in this process group.
SEE ALSO
_exit(2), wait(2), atexit(3), on_exit(3), tmpfile(3)
2001-11-17 EXIT(3)