Source Compatibility Guide

System Calls

The following system calls are implemented in the compatibility package as library routines:

The following routines reside in libucb.

flock

Applies or removes an advisory lock on a file. The compatibility version of flock has been implemented on top of fcntl(2) locking. This version is not completely compatible with the SunOS 4.1 version. The following differences exist:

fstatfs

Gets statistics about an open file on a mounted file system.

getdtablesize

Gets the size of a process's descriptor table. This routine calls the getrlimit(2) system call.

gethostid

Returns the 32-bit identifier for the current host. This routine calls the sysinfo(2) system call.

gethostname

Returns the standard hostname for the current processor. This routine calls the sysinfo(2) system call.

getpagesize

Returns the number of bytes in a page. This routine calls the sysconf(3C) routine.

getpriority

Gets the process scheduling priority. Returns the highest priority (lowest numerical value) of any of the specified processes. This routine calls the priocntl(2) system call.

gettimeofday

Gets date and time. This routine calls the default version of gettimeofday(3C). Note that this version of gettimeofday accepts two arguments for compatibility purposes, although it ignores the second one.

killpg

Sends a signal to a process group. This routine calls the kill(2) system call.

mctl

Applies memory management control functions. This routine calls the memcntl(3) routine.

reboot

Restart system or halt processor. This routine calls the uadmin(2) system call.

sethostname

Sets the name of the host machine. This routine calls the sysinfo(2) system call.

setpriority

Sets the program scheduling priority. The default priority is 0. It is not possible for the process executing setpriority to lower any other process down to its current priority, without appropriate privileges. This routine calls the priocntl(2) and priocntlset(2) system calls.

setregid

Set real and effective group ID's. This routine calls the setgid(2) or setegid system calls. Exact BSD semantics are not always maintained. The real gid is not always changed. Not all cases can be handled.

setreuid

Sets real and effective user ID's. Calls SunOS 5.x's setuid or seteuid. Exact BSD semantics are not always maintained. The real uid is not always changed. Not all cases can be handled.

settimeofday

Sets date and time of day. This routine calls the stime(2) system call. Note that this function accepts two arguments for compatibility purposes, although it ignores the second.

statfs

Gets file system statistics about mounted file systems. Calls statvfs(2).

syscall

Performs indirect system calls.

wait3

Alternative system call to wait(2) for waiting for a process to stop. This routine calls the waitid(2) system call.

wait4

Alternative system call to wait(2) for waiting for a process to stop. This routine calls the waitid(2) system call.