Solaris 1.x to Solaris 2.x Transition Guide
  Search only this book
Download this book in PDF

System Calls Reference Table

B

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

Using the Reference Table

  • If an interface is listed as "changed" (C), a brief description of differences between the SunOS release 4.x system call and the Solaris release 2.4 system call is provided.
  • If an interface is listed as "the same" (S), the Solaris release 2.4 interface will support all features of the SunOS release 4.x interface. In some cases the interface has been enhanced, but can be considered a complete superset of the SunOS release 4.x interface. Note, many system calls are now available as library routines. The Notes column will show the new routine man page reference.
  • If an interface has an "alternative" (A), check the Notes section for its replacement.
  • If an interface is listed as "not available" (N), you cannot use that interface.
  • If the interface includes errno values that are not supported in the standard, it is indicated with "#". errno differences do not necessarily break compatibility. Note that although EDQUOT, EFAULT, and EIO are often not listed with ABI or SVID, these errno values are supported by an ABI or SVID compliant system if appropriate.
SunOS release 4.x 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.x interface, the string 'SysV' is appended to the interface.
For complete information on all Solaris release 2.4 interfaces, see the man Pages(2): System Calls.

Examples

Below are sample table entries followed by an interpretation of the table entry.
SunOS release 4.x System Call
SunOS 5.4
Alternative Available and Notes

ABI

BSD SVID SVR4
mctl(2)AThe memcntl(2) system call provides similar functionality. A A A S


The memctl() system call is not available in the ABI, SVID, SVR4, or the SunOS release 5.4. 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.x System Call
SunOS 5.4
Alternative Available and Notes

ABI

BSD SVID SVR4
getsockname(2)S#The errno value ENOBUFS used by SunOS release 4.x getsockname() system call has been changed to ENOSR in the SVR4 and SunOS 5.4 version.NNS#N
The getsockname() system call is not defined in the ABI, or SVID. The getsockname() call in SunOS release 5.4 and SVR4 releases is the same as the one in SunOS release 4.x, except SunOS release 5.4 sets errno to ENOSR for the error condition that caused SunOS release 4.x to set errno to ENOBUFS.

System Calls

Table B-1 System Calls Reference Table
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
WEXITSTATUS(2)CThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in the SVR4 and SunOS release 5.4 versions.NNSS
WIFEXITED(2)CThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in the SVR4 and SunOS release 5.4 versions.NNCS
WIFSIGNALED(2)CThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in the SVR4 and SunOS release 5.4 versions.NNCS
WIFSTOPPED(2)CThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in the SVR4 and SunOS release 5.4 versions.NNCS
WSTOPSIG(2)CThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in the SVR4 and SunOS release 5.4 versions.NNCS
WTERMSIG(2)CThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in the SVR4 and SunOS release 5.4 versions.NNCS
_exit(2V) -- SysVSSSSN
accept(2)SNow accept(3N).NNSN
access(2V) -- SysVSSSSN
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.x version, but not for SunOS release 5.4, ABI, SVID, and SVR4 versions:

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

C#C#C#N
adjtime(2)SNSSN
async_daemon(2)NNNNN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
audit(2)N
NNNN
auditon(2)NNNNN
auditsvc(2)NNNNN
bind(2)SNow bind(3N).NNSN
brk(2)SNNSN
chdir(2V) -- SysVSSSSN
chmod(2V) -- SysVC#The following symbolic access modes (<sys/stat.h>) are supported by SunOS release 4.x chmod function but not by SunOS release 5.4, ABI, SVID, or SVR4 versions:

S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.4, ABI, SVID, or SVR4 symbolic access modes,

S_IRUSR (00400), S_IWUSR (00200), S_IXUSR (00100), have the same meanings.

C#C#C#N
chown(2V)CIn the SunOS release 4.x version, the owner and group arguments of chown() are of type int. In SunOS release 5.4, ABI, SVID, and SVR4, owner is of type uid_t, and group is of type gid_t.

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

CCCN
chown(2V) -- SysVSSSSN
chroot(2)SSSSN
close(2V) -- SysVSSSSN
connect(2)S#Now connect(3N).NNS#N
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
creat(2V)C#In SunOS release 4.x, the mode argument to creat() is of type int, while in SunOS release 5.4, ABI, SVID, and SVR4, the mode argument is of type mode_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <fcntl.h> while SunOS release 4.x version does not. The following symbolic access modes (<sys/stat.h>) are supported by SunOS release 4.x version of creat(), but not by SunOS release 5.4, ABI, SVID, or SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.4, ABI, SVID, and SVR4 symbolic access modes, S_IRUSR (00400), S_IWUSR (00200), S_IXUSR (00100), do have the same definitions, are defined in SunOS release 4.x <sys/stat.h>, and thus should be used. The following errno flags are valid for SunOS release 4.x version of this system call but are not valid in SunOS release 5.4, ABI, SVID, or SVR4 versions: ENXIO, EOPNOTSUPP.C#C#C#N
creat(2V) -- SysVC#The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4.x version of creat(), but not by SunOS release 5.4, ABI, SVID, or SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.4, ABI, SVID, and SVR4 symbolic access modes, S_IRUSR (00400), S_IWUSR (00200), S_IXUSR (00100), do have the same definitions, are defined in SunOS release 4.x <sys/stat.h>, and thus should be used. The following errno flags are valid for the SunOS release 4.x version of this system call but are not valid in SunOS release 5.4, ABI, SVID, or SVR4 versions: ENXIO, EOPNOTSUPP.C#C#C#N
dup(2V) -- SysVSSSSN
dup2(2V) -- SysVSNow dup2(3C).SSSN
execve(2V) -- SysVSSSSN
fchdir(2V) -- SysVSSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
fchmod(2V) -- SysVCThe following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4.x version of fchmod(), but not by SunOS release 5.4, ABI, SVID, or SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.4, ABI, SVID, and SVR4 symbolic access modes, S_IRUSR (00400), S_IWUSR (00200), S_IXUSR (00100), do have the same definitions, are defined in SunOS release 4.x <sys/stat.h>, and thus should be used.CCCN
fchown(2)SSSSN
fchroot(2)SNNNN
fcntl(2V) -- SysVCIn SunOS release 4.x, 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.4, ABI, SVID, and SVR4 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.x F_GETOWN and F_SETOWN commands are not supported in SunOS release 5.4, ABI, SVID, or SVR4 versions.CCCN
flock(2)NNNNS
fork(2V)CIn SunOS release 4.x, fork() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, fork() returns a value of type pid_t. Also, SunOS release 5.4, ABI, SVID, or SVR4 versions includes <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
fork(2V) -- SysVSSSSN
fpathconf(2V) -- SysVSSSSN
fstat(2V) -- SysVSSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
fstatfs(2)AThe fstatvfs(2) system call provides equivalent functionality.AAAS
fsync(2)SSSSN
ftruncate(2)SNow ftruncate(3C).NNSN
getauid(2)NNNNN
getdents(2)SNNSN
getdirentries(2)AThe getdents(2) system call provides equivalent functionality.NNNN
getdomainname(2)AThe sysinfo(2) system call provides equivalent functionality.NNNN
getdtablesize(2)AThe getrlimit(2) system call with the resource argument set to RLIMIT_NOFILE provides similar functionality.AAAS
getegid(2V)CIn SunOS release 4.x, getegid() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, getegid() returns a value of type gid_t. Also, SunOS release 5.4, ABI, SVID, or SVR4 versions includes <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
getegid(2V) -- SysVSSSSN
geteuid(2V)CIn SunOS release 4.x, geteuid() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, geteuid() returns a value of type uid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
geteuid(2V) -- SysVSSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
getgid(2V)CIn SunOS release 4.x, getgid() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, getgid() returns a value of type gid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
getgid(2V) -- SysVSSSSN
getgroups(2V)CIn SunOS release 4.x, the gidset argument to getgroups() is of type int, while in SunOS release 5.4, ABI, SVID, and SVR4, the grouplist argument is of type gid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
getgroups(2V) -- SysVSSSSN
gethostid(2)AThe sysinfo(2) system call with the command argument set to SI_HW_SERIAL provides similar functionality.NNNS
gethostname(2)AThe sysinfo(SI_HOSTNAME, name, namelen); routine provides similar functionality.NNNS
getitimer(2)SNSSN
getmsg(2)SSSSN
getpagesize(2)AThe sysconf(3C) routine provides similar functionality.AAAS
getpeername(2)S#Now getpeername(3N). The following errno flag is valid for SunOS release 4.x getpeername() system call but is not valid in the SVR4 and SunOS 5.4 version: ENOBUFS.NNS#N
getpgid(2V)SSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
getpgrp(2V)CThe SunOS release 4.x version of getpgrp() has an argument pid, and getpgrp() returns the process group of the process indicated by pid. SunOS release 5.4, 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.x getpgrp() returns a value of type int, while SunOS release 5.4, ABI, SVID, and SVR4 getpgrp() return a value of type pid_t. SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
getpgrp(2V) -- SysVSSSSN
getpid(2V)CIn SunOS release 4.x, getpid() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, getpid() returns a value of type pid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
getpid(2V) -- SysVSSSSN
getppid(2V)CIn SunOS release 4.x, getppid() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, getppid() returns a value of type pid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
getppid(2V) -- SysVSSSSN
getpriority(2)AThe priocntl(2) system call provides similar functionality.AAAS
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
getrlimit(2)CIn SunOS release 4.x, 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.4, ABI, SVID, and SVR4 versions. SunOS release 5.4, 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.4, 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 as in SunOS release 4.x.CCCN
getrusage(2)NThe sysconf(3C) routine provides similar functionality. The ru_utime and ru_stime elements are of type timeval in SunOS release 4.x, in the getrusage(3B) routine, these are of type timestruct_t.NNNC
getsockname(2)S#The errno value ENOBUFS used by SunOS release 4.x getsockname() system call has been changed to ENOSR in the SVR4 and SunOS 5.4 version.NNS#N
getsockopt(2)SNow getsockopt(3N).NNSN
gettimeofday(2)SNow gettimeofday(3C).NSSS
getuid(2V)CIb SunOS release 4.x, getuid() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, getuid() returns a value of type uid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
getuid(2V) -- SysVSSSSN
ioctl(2)CSee "ioctl() Requests" on page 165CCCN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
kill(2V)CIn SunOS release 4.x, 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.4, ABI, SVID, and SVR4, the signal is sent to the sending process as well. In SunOS release 4.x, the pid argument is of type int, while in SunOS release 5.4, ABI, SVID, and SVR4, the pid argument is of type pid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <sys/types.h> while the SunOS release 4.x version does not.CCCN
kill(2V) -- SysVSSSSN
killpg(2)AThe kill(2) system call provides similar functionality. Replace killpg(pgrp, sig) with

kill(-pgrp, sig).

AAAS
link(2V) -- SysVCIn SunOS release 5.4, 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.CCCN
listen(2)SNow listen(3N).NNSN
lseek(2V) -- SysVSSSSN
lstat(2V) -- SysVSSSSN
mctl(2)AThe memcntl(2) system call provides similar functionality.AAAS
mincore(2)CIn SunOS release 4.x, argument len is of type int, while in SVR4 and SunOS 5.4, argument len is of type size_t which is defined to be unsigned int. SunOS release 5.4 version also requires inclusion of <unistd.h>.NNCN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
mkdir(2V)CIn SunOS release 4.x, the mode argument is of type int, while in SunOS release 5.4, ABI, SVID, and SVR4, the mode argument is of type mode_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <sys/types.h> and <sys/stat.h> while the SunOS release 4.x version does not.

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

CCCN
mkdir(2V) -- SysVCThe following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4.x version of mkdir(), but not by SunOS release 5.4, ABI, SVID, and SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.4, ABI, SVID, and SVR4 symbolic access modes, S_IRUSR (00400), S_IWUSR (00200), S_IXUSR (00100), do have the same definitions, are defined in SunOS release 4.x <sys/stat.h>, and thus should be used.CCCN
mkfifo(2V) -- SysVSNow mkfifo(3C).SSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
mknod(2V) -- SysVCThe mode argument to mknod() is of type int in SunOS release 4.x and of type mode_t in SunOS release 5.4, ABI, SVID, and SVR4. The dev argument is of type int in SunOS release 4.x and of type dev_t in SunOS release 5.4, or the

ABI, SVID, or SVR4. The following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4.x version of mknod(), but not by SunOS release 5.4, 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), S_IXUSR (00100), do have the same definitions, are defined in SunOS release 4.x <sys/stat.h>, and thus should be used.

CCCN
mmap(2)CIn SunOS release 4.x, mmap flag option value includes MAP_TYPE, defined in <sys/mman.h>, which is not defined in SunOS release 5.4, ABI, SVID, and SVR4 <sys/mman.h>.CCCN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
mount(2)C#The SunOS release 4.x version of mount() and the SunOS 5.4 release, or the ABI, SVID, or SVR4 version of mount() are incompatible in a number of respects. The first argument in SunOS release 4.x, type, is the file system type name, while in SunOS release 5.4, ABI, SVID, and SVR4, the first argument is fs, is the name of the file system. In SunOS release 5.4, ABI, SVID, and SVR4 versions, the file system type name, fstype, is the fourth argument to mount(). The SunOS release 4.x version uses a single parameter (caddr_t data, the fourth argument) to pass type specific arguments, while SunOS release 5.4, ABI, SVID, and SVR4 version uses two parameters (five and six: const char *dataptr and int datalen). Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <sys/types.h> before <sys/mount.h> while the SunOS release 4.x version does not. The SunOS release 4.x 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) which are not defined in SunOS release 5.4, 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.x version of mount() and no replacement is required for SunOS release 5.4, ABI, SVID, or SVR4. The functionality of the following flags, defined in <sys/mount.h>, is not supported by the SunOS 5.4 release, or the ABI, SVID, or SVR4 versions: M_NOSUB, M_GRPID, M_MULTI.

SunOS release 4.x mount() uses the following errno values which are not returned by the SunOS 5.4 release, or the ABI, SVID, or SVR4 version: ENODEV, EACCES, EMFILE, ENOMEM.

C#C#C#N
mprotect(2)SSSSN
msgctl(2)SSSSN
msgget(2)SSSSN
msgrcv(2)SSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
msgsnd(2)S
SSSN
msync(2)SS#S#SN
munmap(2)SSSSN
nfssvc(2)AThis interface is replaced in SunOS release 5.4 by the nfssys(NFS_SVC,...); routine.NNNN
open(2V)C#The mode argument to open() is of type int in SunOS release 4.x and of type mode_t in SunOS release 5.4, ABI, SVID, and SVR4. In SunOS release 4.x, if the path argument is an empty string, the kernel maps this empty pathname to `.', the current directory. In SunOS release 5.4, ABI, SVID, and SVR4, if path points to an empty string an error results. In SunOS release 4.x, 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.4, ABI, SVID, and SVR4, 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.4, ABI, SVID, and SVR4 versions include <sys/types.h> and <sys/stat.h> while the SunOS release 4.x 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.4, ABI, SVID, and SVR4 versions: EOPNOTSUPP.

C#C#C#N
open(2V) -- SysVS#The following errno value is valid for the SunOS release 4.x version of this system call but is not returned in SunOS release 5.4, ABI, SVID, and SVR4 versions: EOPNOTSUPP.S#S#S#N
pathconf(2V) -- SysVSSSSN
pipe(2V) -- SysVSSSSN
poll(2)SSSSN
profil(2)SSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
ptrace(2)C#The optional addr2 argument to SunOS release 4.x ptrace() system call is not supported by the SunOS 5.4 routine. The request argument to ptrace() is of type enum ptracereq in SunOS release 4.x and of type int in SunOS release 5.4. The pid argument to ptrace() is of type int in SunOS release 4.x and of type pid_t in SunOS release 5.4. Also, the SunOS 5.4 version includes <sys/types.h> while the SunOS release 4.x version includes <signal.h>, <sys/ptrace.h>, and <sys/wait.h>. The following errno flag is valid for the SunOS release 4.x version of this system call, but is not valid in the SunOS 5.4 version: EPERM.

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

C#C#C#N
putmsg(2)SSSSN
quotactl(2)AThe fcntl(2V) system call provides similar functionality.AAAN
read(2V)C#The following errno flags are valid for the SunOS release 4.x version of this system call but are not valid in SunOS release 5.4, ABI, SVID, and SVR4 versions: EISDIR, EWOULDBLOCK.C#C#C#N
read(2V) -- SysVC#The nbyte argument to read() is of type int in SunOS release 4.x and of type unsigned in SunOS release 5.4. The SunOS 5.4 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 SunOS release 4.x read() routine.

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

C#C#C#N
readlink(2)SSSSN
readv(2V)C#The following errno flags are valid for the SunOS release 4.x version of this system call but are not valid in SunOS release 5.4, ABI, SVID, and SVR4 versions: EISDIR, EWOULDBLOCK.C#C#C#N
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
readv(2V) -- SysVC#SunOS release 4.x and SunOS release 5.4, or the SVID or SVR4 iovec structures (defined in <sys/uio.h>) differ slightly. SunOS release 4.x iovec's iov_len field is defined as integer, while SunOS release 5.4, or the SVID or SVR4 iov_len is defined as unsigned. SunOS release 5.4, or the SVID or SVR4 readv() system call does not support BSD 4.2 style non- blocking I/O as does SunOS release 4.xC#C#C#N
reboot(2)AThe uadmin(2) system call provides similar functionality.NNNS
recv(2)SNow recv(3N).NNSN
recvfrom(2)SNow recvfrom(3N).NNSN
recvmsg(2)SNow recvmsg(3N).NNSN
rename(2V) -- SysVS#The SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> while the SunOS release 4.x version does not. The following errno flag is valid for the SunOS release 4.x version of this system call but is not valid in SunOS release 5.4, ABI, SVID, and SVR4 versions: ENOTEMPTY. SunOS release 5.4, ABI, SVID, and SVR4 versions set errno to flag EEXIST instead.S#S#S#N
rmdir(2V) -- SysVS#The SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> while the SunOS release 4.x version does not. The following errno flag is valid for the SunOS release 4.x version of this system call but is not valid in SunOS release 5.4, ABI, SVID, and SVR4 versions: ENOTEMPTY. SunOS release 5.4, ABI, SVID, and SVR4 versions set errno to flag EEXIST instead.S#S#S#N
sbrk(2)SNNSN
select(2)SNow select(3C).NNSN
semctl(2)SSSSN
semget(2)SSSSN
semop(2)SSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
send(2)S#Now send(3N).

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

NNS#N
sendmsg(2)S#Now sendmsg(3N).

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

NNS#N
sendto(2)S#Now sendto(3N).

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

NNS#N
setaudit(2)NNNNN
setauid(2)NNNNN
setdomainname(2)AThe sysinfo(2) system call provides similar functionality.NNNN
setgroups(2V)CInt SunOS release 4.x, the gidset argument is of type int, while in SunOS release 5.4, ABI, SVID, and SVR4, the grouplist argument is of type gid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not.CCCN
setgroups(2V) -- SysVSSSSN
sethostname(2)AThe sysinfo(2) system call with the command argument set to SI_SET_HOSTNAME provides similar functionality.NNNS
setitimer(2)SNSSN
setpgid(2V) -- SysVSSSSN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
setpgrp(2V)C#The SunOS release 4.x version of setpgrp() has arguments pid and pgrp, and setpgrp() sets the process group to pgrp of the process indicated by pid. The SunOS 5.4 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.x setpgrp() call is identical to a SunOS 5.4 setpgrp() call with no arguments. Also, SunOS release 4.x setpgrp() returns a value of type int, while SunOS release 5.4,setpgrp() returns a value of type pid_t. Also, the SunOS 5.4 version includes <unistd.h> and <sys/types.h> while the SunOS release 4.x version does not. In SunOS release 5.4, the function stashed() should be used instead of setpgrp(), which is being phased out. It behaves identically.

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

C#C#C#N
setpgrp(2V) -- SysVS#In SunOS release 5.4, ABI, SVID, and SVR4, the function setsid() should be used instead of setpgrp(), which is being phased out. It behaves identically. The following errno flags are valid for SunOS release 4.x setpgrp(2V) system call but is not valid in SunOS release 5.4, ABI, SVID, and SVR4 versions: EACCES, EINVAL, ESRCH.S#S#S#N
setpriority(2)AThe priocntl(2) system call provides similar functionality.AAAS
setregid(2)AThe setgid(rgid) and setegid(egid) routines provide similar functionality in SunOS release 5.4.NNNC
setreuid(2)AThe setuid(ruid) and seteuid(euid) routines provide similar functionality in SunOS release 5.4.NNNC
setrlimit(2)CSee getrlimit(2).CCCN
setsid(2V) -- SysVSSSSN
setsockopt(2)SNow setsockopt(3N).NNSN
settimeofday(2)SNow settimeofday(3C).NSSS
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
setuseraudit(2)N
NNNN
sgetl(2)SNow sgetl(3X).NSSN
shmat(2)SSSSN
shmctl(2)SSSSN
shmdt(2)SSSSN
shmget(2)SSSSN
shutdown(2)SNow shutdown(3N).NNSN
sigblock(2)AThe sigprocmask(2) system call with the how argument set to SIG_BLOCK provides similar functionality.AAAS
sigaction(2)CThere is a flag in the Solaris release 2.4 version, SA_RESTART, which allows a function that is interrupted by the execution of this signal's handler to be transparently restarted by the system.NCCS
sigmask(2)AThe sigsetops(3C) routines provide similar functionality in SunOS release 5.4, ABI, SVID, and SVR4.AAAS
sigpause(2V) -- SysVSSunOS release 4.x 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 5.4 sigpause() is compatible with SunOS release 4.x sigpause(2).CCSS
sigpending(2V) -- SysVSSSSN
sigprocmask(2V) -- SysVSSSSN
sigsetmask(2)AThe sigprocmask(2) routine with the how argument set to SIG_SETMASK provides similar functionality in SunOS release 5.4, ABI, SVID, and SVR4.AAAS
sigstack(2)AThe sigaltstack(2) system call provides similar functionality.AAAS
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
sigsuspend(2V) -- SysVS
SSSN
sigvec(2)AThe sigaction(2) system call provides similar functionality.AAAS
socket(2)C#Now socket(3N).

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

NNC#N
socketpair(2)SNow socketpair(3N).NNSN
sputl(2)SNow sputl(3X).NSSN
stat(2V) -- SysVSSSSN
statfs(2)AThe statvfs(2) system call provides similar functionality.AAAN
swapon(2)AThe uadmin(2) system call provides similar functionality.NNNN
symlink(2)SSSSN
sync(2)SSSSN
syscall(2)NNNNS
sysconf(2V) -- SysVSNow sysconf(3C).SSSN
tell(2V) -- SysVSSNSN
truncate(2)SNow truncate(3C).NNSN
umask(2V) -- SysVCThe following symbolic access modes (<sys/stat.h>) are supported by the SunOS release 4.x version of umask(), but not by SunOS release 5.4, ABI, SVID, and SVR4 versions: S_IREAD (00400), S_IWRITE (00200), S_IEXEC (00100). However, the equivalent SunOS release 5.4, ABI, SVID, and SVR4 symbolic access modes, S_IRUSR (00400), S_IWUSR (00200), S_IXUSR (00100), do have the same definitions, are defined in SunOS release 4.x <sys/stat.h>, and thus should be used.CCCN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
umount(2V) -- SysVS
SSSN
uname(2V) -- SysVSSSSN
unlink(2V) -- SysVSSSSN
unmount(2)AThe umount(2) system call provides similar functionality.AAAN
ustat(2)SSSSN
utimes(2)SNNNN
vadvise(2)NNNNN
vfork(2)SNNSN
vhangup(2)SNNNN
wait(2V)CIn SunOS release 4.x, wait() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, wait() returns a value of type pid_t. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <sys/types.h> while the SunOS release 4.x version does not. The union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in SunOS release 5.4, ABI, SVID, and SVR4 versions. In SunOS release 4.x, 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.4, ABI, SVID, and SVR4, the wait() system call returns prematurely if a signal is received.CCCN
wait(2V) -- SysVCThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in SunOS release 5.4, ABI, SVID, and SVR4 versions. In SunOS release 4.x, 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 SunOS release 5.4, ABI, SVID, and SVR4, the wait(2) function will return prematurely if a signal is received.CCCN
wait3(2V)AThe wait(2) and waitpid(2) system calls provide similar functionality.AAAS
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
wait4(2V)AThe wait(2) and waitpid(2) system calls provide similar functionality.AAAS
waitpid(2V)CIn SunOS release 4.x, waitpid() returns a value of type int. In SunOS release 5.4, ABI, SVID, and SVR4, waitpid() returns a value of type pid_t. The pid argument to waitpid() is of type int in SunOS release 4.x and of type pid_t in SunOS release 5.4, ABI, SVID, and SVR4. Also, SunOS release 5.4, ABI, SVID, and SVR4 versions include <sys/types.h> while the SunOS release 4.x version does not. The union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in SunOS release 5.4, ABI, SVID, and SVR4 versions. In SunOS release 4.x, 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.4, ABI, SVID, and SVR4, the waitpid() system call returns prematurely if a signal is received.CCCN
waitpid(2V) -- SysVCThe union wait, supported in SunOS release 4.x for backwards compatibility with previous SunOS releases, is not supported in SunOS release 5.4, ABI, SVID, and SVR4 versions. In SunOS release 4.x, 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.4, ABI, SVID, and SVR4, the waitpid(2) function will return prematurely if a signal is received.CCCN
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
write(2V)C#In SunOS release 4.x, if the object which descriptor refers to is marked for non-blocking I/O, using the FIONBIO request to ioctl(), or by using fcntl() to set the FNDELAY or O_NDELAY flag, write() returns -1 and sets errno to EWOULDBLOCK.

In SunOS release 5.4, 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 5.4 write() routine does not support 4.2 BSD style non-blocking I/O.

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

C#C#C#N
write(2V) -- SysVC#The SunOS release 5.4, 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.x version of this system call but is not valid in SunOS release 5.4, ABI, SVID, and SVR4 versions: EWOULDBLOCK.C#C#C#N
Table B-1 System Calls Reference Table (Continued)
SunOS
SunOS Release 4.x
Release
System Call.... 5.4
Notes
ABI
BSD SVID SVR4
writev(2V)C#SunOS release 5.4, 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.x version of this system call but is not valid in the SunOS release 5.4 release, or the ABI, SVID, or SVR4 version: EWOULDBLOCK.C#C#C#N