-->

Previous | Table of Contents | Next

Page 1145

The mode member of the ipc_perm structure defines, with its lower nine bits, the access permissions to the resource for a process executing an ipc system call. The permissions are interpreted as follows:

0400 Read by user.
0200 Write by user.
0040 Read by group.
0020 Write by group.
0004 Read by others.
0002 Write by others.

Bits 0100, 0010, and 0001 (the execute bits) are unused by the system. Furthermore "write" effectively means "alter" for a semaphore set.

The same system header file defines also the following symbolic constants:

IPC_CREAT Create entry if key doesn't exists.
IPC_EXCL Fail if key exists.
IPC_NOWAIT Error if request must wait.
IPC_PRIVATE Private key.
IPC_RMID Remove resource.
IPC_SET Set resource options.
IPC_STAT Get resource options.

Note that IPC_PRIVATE is a key_t type, whereas all the others symbolic constants are flag fields ORable into an int type variable.

MESSAGE QUEUES

A message queue is uniquely identified by a positive integer (its msqid) and has an associated data structure of type struct msquid_ds, defined in <sys/msg.h>, containing the following members:


struct ipc_perm msg_perm;

ushort msg_qnum; /* no of messages on queue */

ushort msg_qbytes; /* bytes max on a queue */

ushort msg_lspid; /* pid of last msgsnd call */

ushort msg_lrpid; /* pid of last msgrcv call */

time_t msg_stime; /* last msgsnd time */

time_t msg_rtime; /* last msgrcv time */

time_t msg_ctime; /* last change time */

msg_perm ipc_perm structure that specifies the access permissions on the message queue.
msg_qnum Number of messages currently on the message queue.
msg_qbytes Maximum number of bytes of message text allowed on the message queue.
msg_lspid ID of the process that performed the last msgsnd system call.
msg_lrpid ID of the process that performed the last msgrcv system call.
msg_stime Time of the last msgsnd system call.
msg_rtime Time of the last msgcv system call.
msg_ctime Time of the last system call that changed a member of the msqid_ds structure.

SEMAPHORE SETS

A semaphore set is uniquely identified by a positive integer (its semid) and has an associated data structure of type struct semid_ds, defined in <sys/sem.h>, containing the following members:


struct ipc_perm sem_perm;

time_t sem_otime; /* last operation time */

Page 1146


time_t sem_ctime; /* last change time */

ushort sem_nsems; /* count of sems in set */

sem_perm ipc_perm structure that specifies the access permissions on the semaphore set.
sem_otime Time of last semop system call.
sem_ctime Time of last semctl system call that changed a member of the above structure or of one semaphore belonging to the set.
sem_nsems Number of semaphores in the set. Each semaphore of the set is referenced by a non-negative integer ranging from 0 to sem_nsems_1.

A semaphore is a data structure of type struct sem containing the following members:


ushort semval; /* semaphore value */

short sempid; /* pid for last operation */

ushort semncnt; /* no. of awaiting semval to increase */

ushort semzcnt; /* no. of awaiting semval = 0 */

semval Semaphore value: a non-negative integer.
sempid ID of the last process that performed a semaphore operation on this semaphore.
semncnt Number of processes suspended awaiting for semval to increase.
semznt Number of processes suspended awaiting for semval to become zero.

SHARED MEMORY SEGMENTS

A shared memory segment is uniquely identified by a positive integer (its shmid) and has an associated data structure of type struct shmid_ds, defined in <sys/shm.h>, containing the following members:


struct ipc_perm shm_perm;

int shm_segsz; /* size of segment */

ushort shm_cpid; /* pid of creator */

ushort shm_lpid; /* pid, last operation */

short shm_nattch; /* no. of current attaches */

time_t shm_atime; /* time of last attach */

time_t shm_dtime; /* time of last detach */

time_t shm_ctime; /* time of last change */

shm_perm ipc_perm structure that specifies the access permissions on the shared memory segment.
shm_segsz Size in bytes of the shared memory segment.
shm_cpid ID of the process that created the shared memory segment.
shm_lpid ID of the last process that executed a shmat or shmdt system call.
shm_nattch Number of current alive attaches for this shared memory segment.
shm_atime Time of the last shmat system call.
shm_dtime Time of the last shmdt system call.
shm_ctime Time of the last shmctl system call that changed shmid_ds.

SEE ALSO

ftok(3), msgctl(2), msgget(2), msgrcv(2), msgsnd(2), semctl(2), semget(2), semop(2), shmat(2), shmctl(2), shmget(2), shmdt (2)

Linux 0.99.13, 1 November 1993

issue

issue—Issue identification file.

Page 1147

DESCRIPTION

The file /etc/issue is a text file that contains a message or system identification to be printed before the login prompt. It may contain various @char and \char sequences if supported by getty(1).

FILES

/etc/issue

SEE ALSO

getty(1), motd(5)

Linux, 24 July 1993

lilo.conf

lilo.conf—Configuration file for LILO.

DESCRIPTION

This file, by default /etc/lilo.conf, is read by the boot loader installer LILO (see lilo(8)).

It might look as follows:


boot = /dev/hda

delay = 40

compact

vga = normal

root = /dev/hda1

read-only

image = /zImage-1.5.99

        label = try

image = /zImage-1.0.9

        label = 1.0.9

image = /tamu/vmlinuz

        label = tamu

        root = /dev/hdb2

        vga = ask

other = /dev/hda3

        label = dos

        table = /dev/hda

This configuration file specifies that LILO uses the Master Boot Record on /dev/hda. (For a discussion of the various ways to use LILO and the interaction with other operating systems, see user.tex from the LILO documentation.)

When booting, the boot loader will wait 4 seconds (40 deciseconds) for you to press Shift. If you don't, then the first kernel image mentioned (/zImage-1.5.99, which you probably installed just 5 minutes ago) will be booted. If you do, the boot loader will ask you which image to boot. In case you forgot the possible choices, press Tab (or ? if you have a U.S. keyboard), and you will be presented with a menu. You now have the choice of booting this brand new kernel, an old trusted kernel, or a kernel on another root file system (just in case you did something stupid on your usual root) or booting a different operating system. There can be up to 16 images mentioned in lilo.conf.

As can be seen previously, a configuration file starts with a number of global options (the top six lines in the example), followed by descriptions of the options for the various images. An option in an image description will override a global option.

Previous | Table of Contents | Next