Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

setlcid(3) [osx man page]

SETLCID(3)						   BSD Library Functions Manual 						SETLCID(3)

NAME
setlcid -- set login context SYNOPSIS
#include <sys/lctx.h> int setlcid(pid_t pid, pid_t lcid); DESCRIPTION
The setlcid() system call sets the login context of the specified process pid to the specified lcid. If the pid is zero, then the call applies to the current process. If the lcid is zero a new login context will be created. If the lcid is -1 the process will be removed from the login context it is currently a member of, if any. Creation of a new login context is only valid for the current process. A process may not create a new login context if it is currently a member of one. Superuser privilege is required to add or remove a process from a login context. RETURN VALUES
The setlcid() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The setlcid() function will fail if: [EPERM] Operation not permitted. [ESRCH] No such process. [ENOMEM] Cannot allocate memory. [ENOATTR] Attribute not found. SEE ALSO
getlcid(2) HISTORY
The setlcid manual page first appeared in FreeBSD 6.0. AUTHORS
This manual page was written by Matthew N. Dodd <mdodd@FreeBSD.org>. BSD
May 5, 2005 BSD

Check Out this Related Man Page

SETPGID(2)						      BSD System Calls Manual							SETPGID(2)

NAME
setpgid, setpgrp -- set process group LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int setpgid(pid_t pid, pid_t pgrp); int setpgrp(pid_t pid, pid_t pgrp); DESCRIPTION
setpgid() sets the process group of the specified process pid to the specified pgrp. If pid is zero, then the call applies to the current process. If pgrp is zero, then the process id of the process specified by pid is used instead. If the invoker is not the super-user, then the affected process must have the same effective user-id as the invoker or be a descendant of the invoking process. RETURN VALUES
setpgid() returns 0 when the operation was successful. If the request failed, -1 is returned and the global variable errno indicates the reason. ERRORS
setpgid() will fail and the process group will not be altered if: [EACCES] The value of the pid argument matches the process ID of a child process of the calling process, and the child process has successfully executed one of the exec functions. [EINVAL] The value of the pgrp argument is less than zero. [EPERM] The effective user ID of the requested process is different from that of the caller and the process is not a descendant of the calling process. [ESRCH] The value of the pid argument does not match the process ID of the calling process or of a child process of the calling process. SEE ALSO
getpgrp(2) STANDARDS
The setpgid() function conforms to ISO/IEC 9945-1:1990 (``POSIX.1''). COMPATIBILITY
setpgrp() is identical to setpgid(), and is retained for calling convention compatibility with historical versions of BSD. BSD
December 18, 2003 BSD
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

login error(can not set process env.)

I have created user in AIX 4.3.3 which the member of staff group. but during login ( with su command) it gives the error "can not set process environment " but when it is member of another group -dba -which is the group for oracle database- it works properly. Pls let me know the solution. ... (5 Replies)
Discussion started by: amit
5 Replies

2. UNIX for Advanced & Expert Users

[ES rehat 4] telnet and default context at login

When i telnet the ES 4 server, i always get the question to accept the default context Red Hat Enterprise Linux ES release 4 (Nahant Update 2) Kernel 2.6.9-5.ELsmp on an i686 login: abc Password: Your default context is user_u:system_r:unconfined_t. Do you want to choose a different... (0 Replies)
Discussion started by: progressdll
0 Replies

3. BSD

Invitation to BSD Forum Members

If you are a former member of the abandoned forums over at bsdforums.org, please feel free to suggest subforums for BSD here and we will add them, if you would like to be active here. We have plenty of room for the BSD community here. Welcome! (1 Reply)
Discussion started by: Neo
1 Replies

4. Shell Programming and Scripting

What is my script's process ID ... ???

Hi, Can someone please advise how to get a login's process ID? From the command line, echo $$ will show what I assume is my login's process ID. Is is possible to get this process ID from within a script? To give a clear picture of what am wanting to achieve, I have a script that has to be... (6 Replies)
Discussion started by: newbie_01
6 Replies