Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

setlcid(3) [osx man page]

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

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 <>. BSD
May 5, 2005 BSD

Check Out this Related Man Page

GETSID(2)						      BSD System Calls Manual							 GETSID(2)

getsid -- get process session LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> pid_t getsid(pid_t pid); DESCRIPTION
The session ID of the process identified by pid is returned by getsid(). If pid is zero, getsid() returns the session ID of the current process. RETURN VALUES
Upon successful completion, the function getsid() returns the session ID of the specified process; otherwise, it returns a value of -1 and sets errno to indicate an error. ERRORS
The getsid() system call will fail if: [ESRCH] There is no process with a process ID equal to pid. Note that an implementation may restrict this function call to processes within the same session ID as the calling process. SEE ALSO
getpgid(2), getpgrp(2), setpgid(2), setsid(2), termios(4) HISTORY
The getsid() function call appeared in FreeBSD 3.0. The getsid() function call is derived from its usage in AT&T System V UNIX. BSD
August 19, 1997 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, 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