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) | A | The 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. | N | N | S# | 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) | C | The 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. | N | N | S | S |
| WIFEXITED(2) | C | The 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. | N | N | C | S |
| WIFSIGNALED(2) | C | The 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. | N | N | C | S |
| WIFSTOPPED(2) | C | The 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. | N | N | C | S |
| WSTOPSIG(2) | C | The 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. | N | N | C | S |
| WTERMSIG(2) | C | The 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. | N | N | C | S |
| _exit(2V) -- SysV | S | S | S | S | N |
| accept(2) | S | Now accept(3N). | N | N | S | N |
| access(2V) -- SysV | S | S | S | S | N |
| 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) | S | N | S | S | N |
| async_daemon(2) | N | N | N | N | N |
-
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 |
| N | N | N | N |
| auditon(2) | N | N | N | N | N |
| auditsvc(2) | N | N | N | N | N |
| bind(2) | S | Now bind(3N). | N | N | S | N |
| brk(2) | S | N | N | S | N |
| chdir(2V) -- SysV | S | S | S | S | N |
| chmod(2V) -- SysV | C# | 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) | C | In 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.
| C | C | C | N |
| chown(2V) -- SysV | S | S | S | S | N |
| chroot(2) | S | S | S | S | N |
| close(2V) -- SysV | S | S | S | S | N |
| connect(2) | S# | Now connect(3N). | N | N | S# | 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) -- SysV | C# | 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) -- SysV | S | S | S | S | N |
| dup2(2V) -- SysV | S | Now dup2(3C). | S | S | S | N |
| execve(2V) -- SysV | S | S | S | S | N |
| fchdir(2V) -- SysV | S | S | S | S | N |
-
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) -- SysV | C | The 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. | C | C | C | N |
| fchown(2) | S | S | S | S | N |
| fchroot(2) | S | N | N | N | N |
| fcntl(2V) -- SysV | C | In 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. | C | C | C | N |
| flock(2) | N | N | N | N | S |
| fork(2V) | C | In 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. | C | C | C | N |
| fork(2V) -- SysV | S | S | S | S | N |
| fpathconf(2V) -- SysV | S | S | S | S | N |
| fstat(2V) -- SysV | S | S | S | S | N |
-
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) | A | The fstatvfs(2) system call provides equivalent functionality. | A | A | A | S |
| fsync(2) | S | S | S | S | N |
| ftruncate(2) | S | Now ftruncate(3C). | N | N | S | N |
| getauid(2) | N | N | N | N | N |
| getdents(2) | S | N | N | S | N |
| getdirentries(2) | A | The getdents(2) system call provides equivalent functionality. | N | N | N | N |
| getdomainname(2) | A | The sysinfo(2) system call provides equivalent functionality. | N | N | N | N |
| getdtablesize(2) | A | The getrlimit(2) system call with the resource argument set to RLIMIT_NOFILE provides similar functionality. | A | A | A | S |
| getegid(2V) | C | In 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. | C | C | C | N |
| getegid(2V) -- SysV | S | S | S | S | N |
| geteuid(2V) | C | In 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. | C | C | C | N |
| geteuid(2V) -- SysV | S | S | S | S | N |
-
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) | C | In 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. | C | C | C | N |
| getgid(2V) -- SysV | S | S | S | S | N |
| getgroups(2V) | C | In 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. | C | C | C | N |
| getgroups(2V) -- SysV | S | S | S | S | N |
| gethostid(2) | A | The sysinfo(2) system call with the command argument set to SI_HW_SERIAL provides similar functionality. | N | N | N | S |
| gethostname(2) | A | The sysinfo(SI_HOSTNAME, name, namelen); routine provides similar functionality. | N | N | N | S |
| getitimer(2) | S | N | S | S | N |
| getmsg(2) | S | S | S | S | N |
| getpagesize(2) | A | The sysconf(3C) routine provides similar functionality. | A | A | A | S |
| 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. | N | N | S# | N |
| getpgid(2V) | S | S | S | S | N |
-
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) | C | The 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. | C | C | C | N |
| getpgrp(2V) -- SysV | S | S | S | S | N |
| getpid(2V) | C | In 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. | C | C | C | N |
| getpid(2V) -- SysV | S | S | S | S | N |
| getppid(2V) | C | In 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. | C | C | C | N |
| getppid(2V) -- SysV | S | S | S | S | N |
| getpriority(2) | A | The priocntl(2) system call provides similar functionality. | A | A | A | S |
-
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) | C | In 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. | C | C | C | N |
| getrusage(2) | N | The 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. | N | N | N | C |
| 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. | N | N | S# | N |
| getsockopt(2) | S | Now getsockopt(3N). | N | N | S | N |
| gettimeofday(2) | S | Now gettimeofday(3C). | N | S | S | S |
| getuid(2V) | C | Ib 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. | C | C | C | N |
| getuid(2V) -- SysV | S | S | S | S | N |
| ioctl(2) | C | See "ioctl() Requests" on page 165 | 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
-
| kill(2V) | C | In 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. | C | C | C | N |
| kill(2V) -- SysV | S | S | S | S | N |
| killpg(2) | A | The kill(2) system call provides similar functionality. Replace killpg(pgrp, sig) with
kill(-pgrp, sig).
| A | A | A | S |
| link(2V) -- SysV | C | In 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. | C | C | C | N |
| listen(2) | S | Now listen(3N). | N | N | S | N |
| lseek(2V) -- SysV | S | S | S | S | N |
| lstat(2V) -- SysV | S | S | S | S | N |
| mctl(2) | A | The memcntl(2) system call provides similar functionality. | A | A | A | S |
| mincore(2) | C | In 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>. | N | N | 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
-
| mkdir(2V) | C | In 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.
| C | C | C | N |
| mkdir(2V) -- SysV | C | 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. | C | C | C | N |
| mkfifo(2V) -- SysV | S | Now mkfifo(3C). | S | S | S | N |
-
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) -- SysV | C | The 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.
| C | C | C | N |
| mmap(2) | C | In 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>. | 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
-
| 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) | S | S | S | S | N |
| msgctl(2) | S | S | S | S | N |
| msgget(2) | S | S | S | S | N |
| msgrcv(2) | S | S | S | S | N |
-
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 |
| S | S | S | N |
| msync(2) | S | S# | S# | S | N |
| munmap(2) | S | S | S | S | N |
| nfssvc(2) | A | This interface is replaced in SunOS release 5.4 by the nfssys(NFS_SVC,...); routine. | N | N | N | N |
| 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) -- SysV | S# | 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) -- SysV | S | S | S | S | N |
| pipe(2V) -- SysV | S | S | S | S | N |
| poll(2) | S | S | S | S | N |
| profil(2) | S | S | S | S | N |
-
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) | S | S | S | S | N |
| quotactl(2) | A | The fcntl(2V) system call provides similar functionality. | A | A | A | N |
| 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) -- SysV | C# | 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) | S | S | S | S | N |
| 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) -- SysV | C# | 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.x | C# | C# | C# | N |
| reboot(2) | A | The uadmin(2) system call provides similar functionality. | N | N | N | S |
| recv(2) | S | Now recv(3N). | N | N | S | N |
| recvfrom(2) | S | Now recvfrom(3N). | N | N | S | N |
| recvmsg(2) | S | Now recvmsg(3N). | N | N | S | N |
| rename(2V) -- SysV | S# | 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) -- SysV | S# | 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) | S | N | N | S | N |
| select(2) | S | Now select(3C). | N | N | S | N |
| semctl(2) | S | S | S | S | N |
| semget(2) | S | S | S | S | N |
| semop(2) | S | S | S | S | N |
-
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.
| N | N | S# | 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.
| N | N | S# | 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.
| N | N | S# | N |
| setaudit(2) | N | N | N | N | N |
| setauid(2) | N | N | N | N | N |
| setdomainname(2) | A | The sysinfo(2) system call provides similar functionality. | N | N | N | N |
| setgroups(2V) | C | Int 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. | C | C | C | N |
| setgroups(2V) -- SysV | S | S | S | S | N |
| sethostname(2) | A | The sysinfo(2) system call with the command argument set to SI_SET_HOSTNAME provides similar functionality. | N | N | N | S |
| setitimer(2) | S | N | S | S | N |
| setpgid(2V) -- SysV | S | S | S | S | N |
-
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) -- SysV | S# | 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) | A | The priocntl(2) system call provides similar functionality. | A | A | A | S |
| setregid(2) | A | The setgid(rgid) and setegid(egid) routines provide similar functionality in SunOS release 5.4. | N | N | N | C |
| setreuid(2) | A | The setuid(ruid) and seteuid(euid) routines provide similar functionality in SunOS release 5.4. | N | N | N | C |
| setrlimit(2) | C | See getrlimit(2). | C | C | C | N |
| setsid(2V) -- SysV | S | S | S | S | N |
| setsockopt(2) | S | Now setsockopt(3N). | N | N | S | N |
| settimeofday(2) | S | Now settimeofday(3C). | N | S | S | S |
-
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 |
| N | N | N | N |
| sgetl(2) | S | Now sgetl(3X). | N | S | S | N |
| shmat(2) | S | S | S | S | N |
| shmctl(2) | S | S | S | S | N |
| shmdt(2) | S | S | S | S | N |
| shmget(2) | S | S | S | S | N |
| shutdown(2) | S | Now shutdown(3N). | N | N | S | N |
| sigblock(2) | A | The sigprocmask(2) system call with the how argument set to SIG_BLOCK provides similar functionality. | A | A | A | S |
| sigaction(2) | C | There 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. | N | C | C | S |
| sigmask(2) | A | The sigsetops(3C) routines provide similar functionality in SunOS release 5.4, ABI, SVID, and SVR4. | A | A | A | S |
| sigpause(2V) -- SysV | S | SunOS 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). | C | C | S | S |
| sigpending(2V) -- SysV | S | S | S | S | N |
| sigprocmask(2V) -- SysV | S | S | S | S | N |
| sigsetmask(2) | A | The sigprocmask(2) routine with the how argument set to SIG_SETMASK provides similar functionality in SunOS release 5.4, ABI, SVID, and SVR4. | A | A | A | S |
| sigstack(2) | A | The sigaltstack(2) system call provides similar functionality. | A | A | A | S |
-
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) -- SysV | S |
| S | S | S | N |
| sigvec(2) | A | The sigaction(2) system call provides similar functionality. | A | A | A | S |
| 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.
| N | N | C# | N |
| socketpair(2) | S | Now socketpair(3N). | N | N | S | N |
| sputl(2) | S | Now sputl(3X). | N | S | S | N |
| stat(2V) -- SysV | S | S | S | S | N |
| statfs(2) | A | The statvfs(2) system call provides similar functionality. | A | A | A | N |
| swapon(2) | A | The uadmin(2) system call provides similar functionality. | N | N | N | N |
| symlink(2) | S | S | S | S | N |
| sync(2) | S | S | S | S | N |
| syscall(2) | N | N | N | N | S |
| sysconf(2V) -- SysV | S | Now sysconf(3C). | S | S | S | N |
| tell(2V) -- SysV | S | S | N | S | N |
| truncate(2) | S | Now truncate(3C). | N | N | S | N |
| umask(2V) -- SysV | C | The 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. | 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
-
| umount(2V) -- SysV | S |
| S | S | S | N |
| uname(2V) -- SysV | S | S | S | S | N |
| unlink(2V) -- SysV | S | S | S | S | N |
| unmount(2) | A | The umount(2) system call provides similar functionality. | A | A | A | N |
| ustat(2) | S | S | S | S | N |
| utimes(2) | S | N | N | N | N |
| vadvise(2) | N | N | N | N | N |
| vfork(2) | S | N | N | S | N |
| vhangup(2) | S | N | N | N | N |
| wait(2V) | C | In 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. | C | C | C | N |
| wait(2V) -- SysV | C | 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(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. | C | C | C | N |
| wait3(2V) | A | The wait(2) and waitpid(2) system calls provide similar functionality. | A | A | A | S |
-
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) | A | The wait(2) and waitpid(2) system calls provide similar functionality. | A | A | A | S |
| waitpid(2V) | C | In 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. | C | C | C | N |
| waitpid(2V) -- SysV | C | 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(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. | 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
-
| 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) -- SysV | C# | 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 |
|