Solaris Transition Guide

Appendix B System Calls Reference Table

This appendix contains the System Calls reference table.This table lists all SunOS release 4, and shows their status in the following environments: Solaris 7, the ABI, the SVID, SVR4, and the SunOS/BSD Source Compatibility Package.

Using the Reference Table

The SunOS release 4 software offers a System V Software installation option that provides System V compatible versions of many utilities, system calls, and library routines. The System V interfaces are included in the following tables. When referring to the System V version of a SunOS release 4 interface, the string SysV is appended to the interface.

For complete information on all Solaris 7 interfaces, see the man Pages(2): System Calls.


Note -

System Calls are functions. Functions in this appendix are identified by an empty set of parentheses immediately following the function name. When you see a second set of parentheses containing a number, this nomenclature identifies the associated man page section.


Examples

Below are sample table entries followed by an interpretation of the table entry.

SunOS release 4 System Call 

SunOS release 5.7 Status 

Alternative Available and Notes 

ABI 

SVID 

SVR4 

BSD 

mctl() (2)

The memcntl() (2) system call provides similar functionality.

The mctl() system call is not available in the ABI, SVID, SVR4, or the SunOS release 5.7 software. Any applications that use this system call should be rewritten to use the memcntl() call. A version of mctl() is available with the SunOS/BSD Compatibility package, but applications that use it will not be compatible with other SVR4 systems.

SunOS release 4 System Call 

SunOS release 5.7 Status 

Alternative Available and Notes 

ABI 

SVID 

SVR4 

BSD 

getsockname() (2)

S# 

The errno value ENOBUFS used by the SunOS release 4 getsockname() system call has been changed to ENOSR in the SVR4 and SunOS release 5.7 version.

S# 

The getsockname() system call is not defined in the ABI, or SVID. The getsockname() call in SunOS release 5.7 and SVR4 releases is the same as the one in the SunOS release 4 software, except the SunOS release 5.7 software sets errno to ENOSR for the error condition that previously would have set errno to ENOBUFS.

System Calls

Table B-1 System Calls Reference Table: accept() through auditsvc()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

accept() (2)

Now accept() (3N).

access() (2V) -- SysV

 

acct() (2)

C# 

The following symbolic names are valid for the acct structure member ac_flag (defined in <sys/acct.h>) for SunOS release 4 version, but not for SunOS release 5.7, ABI, SVID, and SVR4 versions:

ACOMPAT, ACORE, AXSIG. Also, the accounting record format differs between SunOS release 4 and SunOS release 5.7, ABI, SVID, and SVR4 versions.

C# 

C# 

C# 

adjtime() (2)

 

async_daemon() (2)

 

audit() (2)

 

auditon() (2)

 

auditsvc() (2)

 

Table B-2 System Calls Reference Table: bind() through brk()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

bind() (2)

Now bind() (3N).

brk() (2)

 

Table B-3 System Calls Reference Table: chdir() through creat()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

chdir() (2V) -- SysV

 

chmod() (2V) -- SysV

C# 

The following symbolic access modes (<sys/stat.h>) are supported by SunOS release 4 chmod() function but not by SunOS release 5.7, ABI, SVID, or SVR4 versions:

S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). 

However, the equivalent SunOS release 5.7, ABI, SVID, or SVR4 symbolic access modes S_IRUSR (00400), S_IWUSR (00200) and S_IXUSR (00100) have the same meanings. 

C# 

C# 

C# 

chown() (2V)

In the SunOS release 4 version, the owner and group arguments of chown() are of type int. In the SunOS release 5.7 software, ABI, SVID, and SVR4, owner is of type uid_t, and group is of type gid_t.

In the SunOS release 4 version, if the final component of path is a symbolic link, the ownership of the symbolic link was changed. In the SunOS release 5.7 version, chown() changes the ownership of the file or directory referred to by the symbolic link. Use lchown() (2) to change the ownership of a symbolic link.

chown() (2V) -- SysV

 

chroot() (2)

 

close() (2V) -- SysV

 

connect() (2)

S# 

Now connect() (3N).

S# 

creat() (2V)

C# 

In the SunOS release 4 software, the mode argument to creat() is of type int, while in SunOS release 5.7, ABI, SVID, and SVR4 versions, the mode argument is of type mode_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <fcntl.h> while the SunOS release 4 version does not.

The following symbolic access modes (<sys/stat.h>) are supported by SunOS release 4 version of creat(), but not by SunOS release 5.7, ABI, SVID, or SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.7, ABI, SVID, and SVR4 symbolic access modes S_IRUSR (00400), S_IWUSR (00200), and S_IXUSR (00100) do have the same definitions, are defined in SunOS release 4 <sys/stat.h>, and thus should be used. The following errno flags are valid for the SunOS release 4 version of this system call but are not valid in SunOS release 5.7, ABI, SVID, or SVR4 versions: ENXIO, EOPNOTSUPP.

C# 

C# 

C# 

creat() (2V) -- SysV

C# 

The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4 version of creat(), but not by SunOS release 5.7, ABI, SVID, or SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.7, ABI, SVID, and SVR4 symbolic access modes S_IRUSR (00400), S_IWUSR (00200), and S_IXUSR (00100) do have the same definitions, are defined in SunOS release 4 <sys/stat.h>, and thus should be used. The following errno flags are valid for the SunOS release 4 version of this system call but are not valid in SunOS release 5.7, ABI, SVID, or SVR4 versions: ENXIO, EOPNOTSUPP.

C# 

C# 

C# 

Table B-4 System Calls Reference Table: dup() through dup2()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

dup() (2V) -- SysV

 

dup2() (2V) -- SysV

Now dup2() (3C).

Table B-5 System Calls Reference Table: execve() through _exit()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

execve() (2V) -- SysV

 

_exit() (2V) -- SysV

 

Table B-6 System Calls Reference Table: fchdir() through ftruncate()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

fchdir() (2V) -- SysV

 

fchmod() (2V) -- SysV

The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4 version of fchmod(), but not by SunOS release 5.7, ABI, SVID, or SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.7, ABI, SVID, and SVR4 symbolic access modes S_IRUSR (00400), S_IWUSR (00200), and S_IXUSR (00100) do have the same definitions, are defined in SunOS release 4 <sys/stat.h>, and thus should be used.

fchown() (2)

 

fchroot() (2)

 

fcntl() (2V) -- SysV

In SunOS release 4, the following flags are valid for the F_SETFL command: -O_APPEND, -O_SYNC, and -O_NDELAY, and the -FSYNC, -FNDELAY, and -FNBIO flags defined in <sys/file.h>. SunOS release 5.7, ABI, SVID, and SVR4 versions support only the -O_APPEND, -O_SYNC, -O_NDELAY, and -O_NONBLOCK flags. Thus, -O_SYNC should be used in place of -FSYNC, and -O_NONBLOCK should be used in place of -FNDELAY and -FNBIO. -O_NONBLOCK should also be used in place of -O_NDELAY, which is being phased out. SunOS release 4 F_GETOWN and F_SETOWN commands are not supported in SunOS release 5.7, ABI, SVID, or SVR4 versions.

flock() (2)

 

fork() (2V)

In the SunOS release 4 software, fork() returns a value of type int. In SunOS release 5.7, ABI, SVID, and SVR4 versions, fork() returns a value of type pid_t. Also, SunOS release 5.7, ABI, SVID, or SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

fork() (2V) -- SysV

 

fpathconf() (2V) -- SysV

 

fstat() (2V) -- SysV

 

fstatfs() (2)

The fstatvfs() (2) system call provides equivalent functionality.

fsync() (2)

 

ftruncate() (2)

Now ftruncate() (3C).

Table B-7 System Calls Reference Table: getauid() through getuid()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

getauid() (2)

 

getdents() (2)

 

getdirentries() (2)

The getdents() (2) system call provides equivalent functionality.

getdomainname() (2)

The sysinfo() (2) system call provides equivalent functionality.

getdtablesize() (2)

Now getdtablesize() (3C). The getrlimit() (2) system call with the resource argument set to RLIMIT_NOFILE provides similar functionality.

getegid() (2V)

In the SunOS release 4 software, getegid() returns a value of type int. In SunOS release 5.7, ABI, SVID, and SVR4 versions, getegid() returns a value of type gid_t. Also, SunOS release 5.7, ABI, SVID, or SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

getegid() (2V) -- SysV

 

geteuid() (2V)

In the SunOS release 4 software, geteuid() returns a value of type int. In SunOS release 5.7, ABI, SVID, and SVR4 versions, geteuid() returns a value of type uid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

geteuid() (2V) -- SysV

 

getgid() (2V)

In the SunOS release 4 software, getgid() returns a value of type int. In SunOS release 5.7, ABI, SVID, and SVR4 versions, getgid() returns a value of type gid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

getgid() (2V) -- SysV

 

getgroups() (2V)

In the SunOS release 4 software, the gidset argument to getgroups() is of type int, while in SunOS release 5.7, ABI, SVID, and SVR4 versions, the grouplist argument is of type gid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

getgroups() (2V) -- SysV

 

gethostid() (2)

Now gethostid() (3C). The sysinfo() (2) system call with the command argument set to SI_HW_SERIAL provides similar functionality.

gethostname() (2)

Now gethostname() (3C). The sysinfo()(SI_HOSTNAME, name, namelen); routine provides similar functionality.

getitimer() (2)

 

getmsg() (2)

 

getpagesize() (2)

Now getpagesize() (3C). The sysconf() (3C) routine provides similar functionality.

getpeername() (2)

S# 

Now getpeername() (3N). The following errno flag is valid for the SunOS release 4 getpeername() system call but is not valid in the SVR4 and SunOS release 5.7 version: ENOBUFS.

S# 

getpgid() (2V)

 

getpgrp() (2V)

The SunOS release 4 version of getpgrp() has an argument pid, and getpgrp() returns the process group of the process indicated by pid. SunOS release 5.7, ABI, SVID, and SVR4 versions of getpgrp() do not accept an argument, and getpgrp() returns the process group ID of the calling process. Also, SunOS release 4 getpgrp() returns a value of type int, while SunOS release 5.7, ABI, SVID, and SVR4 getpgrp() returns a value of type pid_t. SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

getpgrp() (2V) -- SysV

 

getpid() (2V)

In the SunOS release 4 software, getpid() returns a value of type int. SunOS release 5.7, ABI, SVID, and SVR4, getpid() returns a value of type pid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

getpid() (2V) -- SysV

 

getppid() (2V)

In the SunOS release 4 software, getppid() returns a value of type int. SunOS release 5.7, ABI, SVID, and SVR4, getppid() returns a value of type pid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

getppid() (2V) -- SysV

 

getpriority() (2)

Now getpriority() (3C). The priocntl() (2) system call provides similar functionality.

getrlimit() (2)

In SunOS release 4, RLIMIT_RSS is a supported resource (the maximum size, in bytes, to which a process's resident set size may grow) which is not supported in SunOS release 5.7, ABI, SVID, and SVR4 versions. SunOS release 5.7, ABI, SVID, and SVR4 versions additionally support the RLIMIT_AS resource, the maximum amount of a process's address space that is defined (in bytes). Also, SunOS release 5.7, ABI, SVID, and SVR4 versions of rlim_cur(current soft limit) and rlim_max (hard limit) fields in the rlimit structure are rlim_t rather than int.

getrusage() (2)

Now getusage() (3C).

getsockname() (2)

S# 

The errno value ENOBUFS used by the SunOS release 4 getsockname() system call has been changed to ENOSR in the SVR4 and SunOS release 5.7 version.

S# 

getsockopt() (2)

Now getsockopt() (3N).

gettimeofday() (2)

Now gettimeofday() (3C).

getuid() (2V)

In the SunOS release 4 software, getuid() returns a value of type int. SunOS release 5.7, ABI, SVID, and SVR4 getuid() returns a value of type uid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

getuid() (2V) -- SysV

 

Table B-8 System Calls Reference Table: ioctl()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

ioctl() (2)

See "ioctl() Requests"

Table B-9 System Calls Reference Table: kill() through killpg()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

kill() (2V)

In the SunOS release 4 software, if a signal is sent to a group of processes (as with, if pid is 0 or negative), and if the process sending the signal is a member of that group, the signal is not sent to the sending process as well. In SunOS release 5.7, ABI, SVID, and SVR4 versions, the signal is sent to the sending process as well. In the SunOS release 4 software, the pid argument is of type int, while in the SunOS release 5.7, ABI, SVID, and SVR4 versions, the pid argument is of type pid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <sys/types.h> while the SunOS release 4 version does not.

kill() (2V) -- SysV

 

killpg() (2)

Now killpg() (3C). The kill() (2) system call provides similar functionality. Replace killpg()( pgrp, sig) with

kill()(-pgrp, sig).

Table B-10 System Calls Reference Table: link() through lstat()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

link() (2V) -- SysV

In the SunOS release 5.7, ABI, SVID, and SVR4 version of link(), if the last component of the first argument is a symbolic link, it will not be followed and a hard link will be made to the symbolic link.

listen() (2)

Now listen() (3N).

lseek() (2V) -- SysV

 

lstat() (2V) -- SysV

 

Table B-11 System Calls Reference Table: mctl() through munmap()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

mctl() (2)

The memcntl() (2) system call provides similar functionality.

mincore() (2)

In the SunOS release 4 software, argument len is of type int, while in SVR4 and SunOS release 5.7 versions, argument len is of type size_t which is defined to be unsigned int. The SunOS release 5.7 version also requires inclusion of <unistd.h>.

mkdir() (2V)

In SunOS release 4, the mode argument is of type int, while in SunOS release 5.7, ABI, SVID, and SVR4, the mode argument is of type mode_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <sys/types.h> and <sys/stat.h> while the SunOS release 4 version does not.

The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4 version of mkdir(), but not by SunOS release 5.7, ABI, SVID, and SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.7, ABI, SVID, and SVR4 symbolic access modes S_IRUSR (00400), S_IWUSR (00200), and S_IXUSR (00100) do have the same definitions, are defined in SunOS release 4 <sys/stat.h>, and thus should be used.

mkdir() (2V) -- SysV

The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4 version of mkdir(), but not by SunOS release 5.7, ABI, SVID, and SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.7, ABI, SVID, and SVR4 symbolic access modes S_IRUSR (00400), S_IWUSR (00200), and S_IXUSR (00100) do have the same definitions, are defined in SunOS release 4 <sys/stat.h>, and thus should be used.

mkfifo() (2V) -- SysV

Now mkfifo() (3C).

mknod() (2V) -- SysV

The mode argument to mknod() is of type int in the SunOS release 4 software and of type mode_t in SunOS release 5.7, ABI, SVID, and SVR4 versions. The dev argument is of type int in the SunOS release 4 software and of type dev_t in the SunOS release 5.7, ABI, SVID, or SVR4 versions. The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4 version of mknod(), but not by SunOS release 5.7, ABI, SVID, and SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent symbolic access modes S_IRUSR (00400), S_IWUSR (00200), and S_IXUSR (00100) do have the same definitions, are defined in SunOS release 4 <sys/stat.h>, and thus should be used.

mmap() (2)

In the SunOS release 4 software, -mmap flag option value includes MAP_TYPE, defined in <sys/mman.h>, which is not defined in SunOS release 5.7, ABI, SVID, and SVR4 <sys/mman.h>.

mount() (2)

C# 

The SunOS release 4 version of mount() and the SunOS release 5.7, or the ABI, SVID, or SVR4 version of mount() are incompatible in a number of respects. The first argument in the SunOS release 4 version, type, is the file system type name, while in SunOS release 5.7, ABI, SVID, and SVR4 versions, the first argument, fs, is the name of the file system. In SunOS release 5.7, ABI, SVID, and SVR4 versions, the file system type name, fstype, is the fourth argument to mount(). The SunOS release 4 version uses a single parameter (caddr_t data, the fourth argument) to pass type-specific arguments, while the SunOS release 5.7, ABI, SVID, and SVR4 version uses two parameters (five and six: const char *dataptr and int datalen). Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <sys/types.h> before <sys/mount.h> while the SunOS release 4 version does not. The SunOS release 4 version of <sys/mount.h> defines symbolic constants for the mount() flags argument (M_NEWTYPE, M_RDONLY, M_NOSUID, M_NEWTYPE, M_GRPID, M_REMOUNT , M_NOSUB, M_MULTI) that are not defined in SunOS release 5.7, or the ABI, SVID, or SVR4 <sys/mount.h>. Instead, replace M_RDONLY with MS_RDONLY, M_NOSUID with MS_NOSUID, and M_REMOUNT with MS_REMOUNT. The M_NEWTYPE flag is specific to the SunOS release 4 version of mount() and no replacement is required for SunOS release 5.7, ABI, SVID, or SVR4 versions. The functionality of the following flags, defined in <sys/mount.h>, is not supported by the SunOS release 5.7, or the ABI, SVID, or SVR4 versions: M_NOSUB, M_GRPID, M_MULTI. SunOS release 4 mount() uses the following errno values, which are not returned by the SunOS release 5.7, or the ABI, SVID, or SVR4 version: ENODEV, EACCES, EMFILE, ENOMEM.

 

C# 

C# 

C# 

mprotect() (2)

 

msgctl() (2)

 

msgget() (2)

 

msgrcv() (2)

 

msgsnd() (2)

 

msync() (2)

 

S# 

S# 

munmap() (2)

 

Table B-12 System Calls Reference Table: nfssvc()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

nfssvc() (2)

This interface is replaced in SunOS release 5.7 by the

nfssys()(NFS_SVC,...); routine.

Table B-13 System Calls Reference Table: open() through open() -- SysV

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

open() (2V)

C# 

The mode argument to open() is of type int in the SunOS release 4 software and of type mode_t in SunOS release 5.7, ABI, SVID, and SVR4 versions. In the SunOS release 4 software, if the path argument is an empty string, the kernel maps this empty pathname to `.', the current directory. In SunOS release 5.7, ABI, SVID, and SVR4 versions, if path points to an empty string an error results. In the SunOS release 4 software, if the O_NDELAY or O_NONBLOCK flag is set on a call to open, only the open() call itself is effected. In SunOS release 5.7, ABI, SVID, and SVR4 versions, if the O_NDELAY or O_NONBLOCK flag is set on a call to open(), the corresponding flag is set for that file descriptor and subsequent reads and writes to that descriptor will not block.

Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <sys/types.h> and <sys/stat.h> while the SunOS release 4 version does not.

The following errno value is valid for the SunOS

4.1 version of this system call but is not returned in SunOS release 5.7, ABI, SVID, and SVR4 versions: EOPNOTSUPP.

C# 

C# 

C# 

open() (2V) -- SysV

S# 

The following errno value is valid for the SunOS release 4 version of this system call but is not returned in SunOS release 5.7, ABI, SVID, and SVR4 versions: EOPNOTSUPP.

S# 

S# 

S# 

Table B-14 System Calls Reference Table: pathconf() through putmsg()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

pathconf() (2V) -- SysV

 

pipe() (2V) -- SysV

 

poll() (2)

 

profil() (2)

 

ptrace() (2)

C# 

The optional addr2 argument to the SunOS release 4 software ptrace() system call is not supported by the SunOS release 5.7 routine. The request argument to ptrace() is of type enum ptracereq in the SunOS release 4 software and of type int in the SunOS release 5.7 version.

The pid argument to ptrace() is of type int in the SunOS release 4 software and of type pid_t in theSunOS release 5.7 version. Also, the SunOS release 5.7 version includes <sys/types.h> while the SunOS release 4 version includes <signal.h>, <sys/ptrace.h>, and <sys/wait.h>.

The following errno flag is valid for the SunOS release 4 version of this system call, but is not valid in the SunOS release 5.7 version: EPERM.

See "ptrace() Request Values" for information on valid request values.

C# 

C# 

C# 

putmsg() (2)

 

Table B-15 System Calls Reference Table: quotactl()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

quotactl() (2)

The Q_QUOTACTL ioctl()system call provides similar functionality.

Table B-16 System Calls Reference Table: read() through rmdir()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

read() (2V)

C# 

The following errno flags are valid for the SunOS release 4 version of this system call but are not valid in SunOS release 5.7, ABI, SVID, and SVR4 versions: EISDIR, EWOULDBLOCK.

C# 

C# 

C# 

read() (2V) -- SysV

C# 

The nbyte argument to read() is of type int in the SunOS release 4 software and of type unsigned in the SunOS release 5.7 version.

The SunOS release 5.7 read() system call does not support BSD 4.2 style non-blocking I/O (with the FIONBIO ioctl() request or a call to fcntl() (2V) using the FNDELAY flag from <sys/file.h> or the O_NDELAY flag from <fcntl.h> in the 4.2BSD environment) as does the SunOS release 4 read() routine.

The following errno flags are valid for the SunOS release 4 version of this system call, but are not valid in the SunOS release 5.7 version: EISDIR, EWOULDBLOCK.

C# 

C# 

C# 

readlink() (2)

 

readv() (2V)

C# 

The following errno flags are valid for the SunOS release 4 version of this system call but are not valid in SunOS release 5.7, ABI, SVID, and SVR4 versions: EISDIR, EWOULDBLOCK.

C# 

C# 

C# 

readv() (2V) -- SysV

C# 

SunOS release 4 and SunOS release 5.7, or the SVID or SVR4 iovec structures (defined in <sys/uio.h>) differ slightly. The SunOS release 4 iovec iov_len field is defined as integer, while SunOS release 5.7 or the SVID or SVR4 iov_len is defined as unsigned. SunOS release 5.7 or the SVID or SVR4 readv() system call does not support BSD 4.2 style non- blocking I/O.

C# 

C# 

C# 

reboot() (2)

Now reboot() (3C). The uadmin() (2) system call provides similar functionality.

recv() (2)

Now recv() (3N).

recvfrom() (2)

Now recvfrom() (3N).

recvmsg() (2)

Now recvmsg() (3N).

rename() (2V) -- SysV

S# 

The SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> while the SunOS release 4 version does not. The following errno flag is valid for the SunOS release 4 version of this system call but is not valid in SunOS release 5.7, ABI, SVID, and SVR4 versions: ENOTEMPTY . SunOS release 5.7, ABI, SVID, and SVR4 versions set errno to flag EEXIST instead.

S# 

S# 

S# 

rmdir() (2V) -- SysV

S# 

The SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> while the SunOS release 4 version does not. The following errno flag is valid for the SunOS release 4 version of this system call but is not valid in SunOS release 5.7, ABI, SVID, and SVR4 versions: ENOTEMPTY. SunOS release 5.7, ABI, SVID, and SVR4 versions set errno to flag EEXIST instead.

S# 

S# 

S# 

Table B-17 System Calls Reference Table: sbrk() through sysconf()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

sbrk() (2)

 

select() (2)

Now select() (3C).

semctl() (2)

 

semget() (2)

 

semop() (2)

 

send() (2)

S# 

Now send() (3N).

The following errno flag is valid for SunOS release 4 send() (2) system calls but is not valid in the SVR4 and SunOS release 5.7: ENOBUFS.

S# 

sendmsg() (2)

S# 

Now sendmsg() (3N).

The following errno flag is valid for SunOS release 4 sendmsg() (2) system calls but is not valid in the SVR4 and SunOS release 5.7: ENOBUFS.

S# 

sendto() (2)

S# 

Now sendto() (3N).

The following errno flag is valid for SunOS release 4 sendto() (2) system calls but is not valid in the SVR4 and SunOS release 5.7: ENOBUFS.

S# 

setaudit() (2)

 

setauid() (2)

 

setdomainname() (2)

The sysinfo() (2) system call provides similar functionality.

setgroups() (2V)

In the SunOS release 4 software, the gidset argument is of type int, while in SunOS release 5.7, ABI, SVID, and SVR4 versions, the grouplist argument is of type gid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

setgroups() (2V) -- SysV

 

sethostname() (2)

Now sethostname() (3C). The sysinfo() (2) system call with the command argument set to SI_SET_HOSTNAME provides similar functionality.

setitimer() (2)

 

setpgid() (2V) -- SysV

 

setpgrp() (2V)

The SunOS release 4 version of setpgrp() has arguments pid and pgrp, and setpgrp() sets the process group to pgrp of the process indicated by pid. The SunOS release 5.7 version of setpgrp() does not accept an argument, and setpgrp() also creates a new session. However, if pgrp is zero and pid refers to the calling process, then SunOS release 4 setpgrp() call is identical to a SunOS release 5.7 setpgrp() call with no arguments. Also, SunOS release 4 setpgrp() returns a value of type int, while SunOS release 5.7, setpgrp() returns a value of type pid_t. The SunOS release 5.7 version includes <unistd.h> and <sys/types.h> while the SunOS release 4 version does not.

The following errno flags are valid for SunOS release 4 setpgrp() system call but are not valid in SunOS release 5.7, ABI, SVID, and SVR4 versions: EACCES, EINVAL, ESRCH.

C# 

C# 

C# 

setpgrp() (2V) -- SysV

The following errno flags are valid for SunOS release 4 setpgrp() (2V) system call but is not valid in SunOS release 5.7, ABI, SVID, and SVR4 versions: EACCES, EINVAL, ESRCH.

setpriority() (2)

Now setpriority() (3C). The priocntl() (2) system call provides similar functionality.

setregid() (2)

Now setregid() (3C).

setreuid() (2)

Now setreuid() (3C).

setrlimit() (2)

Now setrlimit() (3C).

setsid() (2V) -- SysV

 

setsockopt() (2)

Now setsockopt() (3N).

settimeofday() (2)

Now settimeofday() (3C).

setuseraudit() (2)

 

sgetl() (2)

Now xdr_simple() (3N).

shmat() (2)

 

shmctl() (2)

 

shmdt() (2)

 

shmget() (2)

 

shutdown() (2)

Now shutdown() (3N).

sigaction(2)

There is a flag in the Solaris 7 version, SA_RESTART, that allows a function that is interrupted by the execution of this signal's handler to be transparently restarted by the system.

sigblock() (2)

The sigprocmask() (2) system call with the how argument set to SIG_BLOCK provides similar functionality.

sigmask() (2)

The sigsetops() (3C) routines provide similar functionality.

sigpause() (2V) -- SysV

The SunOS release 4 sigpause() system call assigns its argument (sigmask ) to the set of masked signals while the ABI and SVID versions of sigpause() remove its argument (sig) from the calling process's signal mask. The SVR4 and SunOS release 5.7 sigpause() is compatible with SunOS release 4 sigpause() (2).

sigpending() (2V) -- SysV

 

sigprocmask() (2V) -- SysV

 

sigsetmask() (2)

The sigprocmask() (2) routine with the how argument set to SIG_SETMASK provides similar functionality.

sigstack() (2)

Now sigstack() (3C). The sigaltstack() (2) system call provides similar functionality.

sigsuspend() (2V) -- SysV

 

sigvec() (2)

The sigaction() (2) system call provides similar functionality.

socket() (2)

C# 

Now socket() (3N).

The SunOS release 4 PF_IMPIPNK is a supported domain , while in SVR4 and SunOS release 5.7 software PF_IMPIPNK is not supported. The following errno flags are valid for the SunOS release 4 socket() system call but are not valid in the SVR4 and SunOS release 5.7 version: ENOBUFS, EPROTOTYPE.

C# 

socketpair() (2)

Now socketpair() (3N).

sputl() (2)

Now xdr_simple() (3N).

stat() (2V) -- SysV

 

statfs() (2)

The statvfs() (2) system call provides similar functionality.

swapon() (2)

The swapctl() (2) system call provides similar functionality.

symlink() (2)

 

sync() (2)

 

syscall() (2)

 

sysconf() (2V) -- SysV

Now sysconf() (3C).

Table B-18 System Calls Reference Table: tell() through truncate()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

tell() (2V) -- SysV

 

truncate() (2)

Now truncate() (3C).

Table B-19 System Calls Reference Table: umask() through utimes()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

umask() (2V) -- SysV

The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4 version of umask(), but not by SunOS release 5.7, ABI, SVID, and SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.7, ABI, SVID, and SVR4 symbolic access modes, S_IRUSR (00400), S_IWUSR (00200), and S_IXUSR (00100) do have the same definitions, are defined in SunOS release 4 <sys/stat.h>, and thus should be used.

umount() (2V) -- SysV

 

uname() (2V) -- SysV

 

unlink() (2V) -- SysV

 

unmount() (2)

The umount() (2) system call provides similar functionality.

ustat() (2)

 

utimes() (2)

 

Table B-20 System Calls Reference Table: vadvise() through vhangup()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

vadvise() (2)

 

vfork() (2)

 

vhangup() (2)

 

Table B-21 System Calls Reference Table: wait() through WTERMSIG()

SunOS release 4 System Call 

SunOS release 5.7 Status 

Notes 

ABI 

SVID 

SVR4 

BSD 

wait() (2V)

In SunOS release 4, wait() returns a value of type int. In SunOS release 5.7, ABI, SVID, and SVR4, wait() returns a value of type pid_t. Also, SunOS release 5.7, ABI, SVID, and SVR4 versions include <sys/types.h> while the SunOS release 4 version does not. The union wait, supported in SunOS release 4 for backwards compatibility with previous SunOS releases, is not supported in SunOS release 5.7, ABI, SVID, and SVR4 versions. In SunOS release 4, wait() is automatically restarted when a process receives a signal while awaiting termination, unless the SV_INTERRUPT bit is set in the flags for that signal. In SunOS release 5.7, ABI, SVID, and SVR4, the wait() system call returns prematurely if a signal is received.

wait() (2V) -- SysV

The union wait, supported in the SunOS release 4 softwarefor backwards compatibility, is not supported in SunOS release 5.7, ABI, SVID, and SVR4 versions. The SunOS release 4,wait() (2V) is automatically restarted when a process receives a signal while awaiting termination unless the SV_INTERRUPT bit is set in the flags for that signal. In the SunOS release 5.7, ABI, SVID, and SVR4 versions, the wait() (2) function will return prematurely if a signal is received.

wait3() (2V)

Now wait3() (3C). The wait() (2) and waitpid() (2) system calls provide similar functionality.

wait4() (2V)

Now wait4() (3C). The wait() (2) and waitpid() (2) system calls provide similar functionality.

waitpid() (2V)

SunOS release 4 waitpid() returns a value of type int. In the SunOS release 5.7, ABI, SVID, and SVR4 versions, waitpid() returns a value of type pid_t. The pid argument to waitpid() is of type int in the SunOS release 4 software and of type pid_t in the SunOS release 5.7, ABI, SVID, and SVR4 versions. Also, the SunOS release 5.7, ABI, SVID, and SVR4 versions include <sys/types.h> while the SunOS release 4 version does not. The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in SunOS release 5.7, ABI, SVID, and SVR4 versions. The SunOS release 4 waitpid() is automatically restarted when a process receives a signal while awaiting termination unless the SV_INTERRUPT bit is set in the flags for that signal. In SunOS release 5.7, ABI, SVID, and SVR4 versions, the waitpid() system call returns prematurely if a signal is received.

waitpid() (2V) -- SysV

The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in SunOS release 5.7, ABI, SVID, and SVR4 versions. The SunOS release 4 waitpid() (2V) is automatically restarted when a process receives a signal while awaiting termination unless the SV_INTERRUPT bit is set in the flags for that signal. In SunOS release 5.7, ABI, SVID, and SVR4 versions, the waitpid() (2) function will return prematurely if a signal is received.

WEXITSTATUS() (2)

The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in the SVR4 and SunOS release 5.7 versions.

WIFEXITED() (2)

The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in the SVR4 and SunOS release 5.7 versions.

WIFSIGNALED() (2)

The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in the SVR4 and SunOS release 5.7 versions.

WIFSTOPPED() (2)

The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in the SVR4 and SunOS release 5.7 versions.

write() (2V)

C# 

In the SunOS release 4 software, if the object that the descriptor refers to is marked for non-blocking I/O, using the FIONBIO request to ioctl(), or using fcntl() to set the FNDELAY or O_NDELAY flag, write() returns -1 and sets errno to EWOULDBLOCK.

In the SunOS release 5.7 software, on a write() to a regular file, if O_NDELAY or O_NONBLOCK is set, write() returns -1 and sets errno to EAGAIN.

On write() requests to a pipe or FIFO with O_NONBLOCK or O_NDELAY set, write() does not block the process. If some data can be written without blocking the process, write() writes what it can and returns the number of bytes written; otherwise, when O_NONBLOCK is set, it returns -1 and sets errno to EAGAIN and when O_NDELAY is set, it returns 0.

With O_NDELAY set, write() requests for {PIPE_BUF} or fewer bytes either succeed completely and return nbytes, or return 0. A write() request for greater than {PIPE_BUF} bytes either transfers what it can and returns the number of bytes written, or transfers no data and returns 0. Also, if a request is greater than {PIPE_BUF} bytes and all data previously written to the pipe has been read, write() transfers at least {PIPE_BUF} bytes.

The SunOS release 5.7 write() routine does not support 4.2 BSD style non-blocking I/O.

The following errno flag is valid for the SunOS release 4 version of this system call but is not valid in the SunOS release 5.7 version: EWOULDBLOCK.

C# 

C# 

C# 

write() (2V) -- SysV

C# 

The SunOS release 5.7, ABI, SVID, and SVR4 versions of write() does not support 4.2 BSD style non-blocking I/O. The following errno flag is valid for the SunOS release 4 version of this system call but is not valid in SunOS release 5.7, ABI, SVID, and SVR4 versions: EWOULDBLOCK.

C# 

C# 

C# 

writev() (2V)

C# 

SunOS release 5.7, ABI, SVID, and SVR4 versions of writev() does not support 4.2 BSD style non-blocking I/O. The following errno flag is valid for the SunOS release 4 version of this system call but is not valid in the SunOS release 5.7, or the ABI, SVID, or SVR4 version: EWOULDBLOCK.

C# 

C# 

C# 

WSTOPSIG() (2)

The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in the SVR4 and SunOS release 5.7 versions.

WTERMSIG() (2)

The union wait, supported in the SunOS release 4 software for backwards compatibility, is not supported in the SVR4 and SunOS release 5.7 versions.