.BR pkey_mprotect ()
may still be used, but
.IR pkey
-must be set to -1.
+must be set to \-1.
When called this way, the operation of
.BR pkey_mprotect ()
is equivalent to
system call will return instantly if it would have to read data from
the backing storage or wait for a lock.
If some data was successfully read, it will return the number of bytes read.
-If no bytes were read, it will return -1 and set
+If no bytes were read, it will return \-1 and set
.IR errno
to
.BR EAGAIN .
sa.sa_flags = SA_ONSTACK;
sa.sa_handler = handler(); /* Address of a signal handler */
sigemptyset(&sa.sa_mask);
-if (sigaction(SIGSEGV, &sa, NULL) == -1) {
+if (sigaction(SIGSEGV, &sa, NULL) == \-1) {
perror("sigaction");
exit(EXIT_FAILURE);
}
.BR sigreturn ()
.\" See sysdeps/unix/sysv/linux/sigreturn.c and
.\" signal/sigreturn.c in the glibc source
-wrapper in the GNU C library simply returns -1, with
+wrapper in the GNU C library simply returns \-1, with
.I errno
set to
.BR ENOSYS .)
On error,
.BR mktime ()
returns the value
-.IR "(time_t)\ -1" .
+.IR "(time_t)\ \-1" .
The remaining functions return NULL on error.
On error,
.I errno
int n;
n = scandir(".", &namelist, NULL, alphasort);
- if (n == -1) {
+ if (n == \-1) {
perror("scandir");
exit(EXIT_FAILURE);
}
Instead, the available bytes are returned.
If no byte is available,
.BR read (2)
-will return -1 and
+will return \-1 and
.I errno
will be set to
.BR EAGAIN .
*/
status = pkey_mprotect(buffer, getpagesize(),
PROT_READ | PROT_WRITE, pkey);
- if (status == -1)
+ if (status == \-1)
errExit("pkey_mprotect");
printf("about to read buffer again...\en");
printf("buffer contains: %d\en", *buffer);
status = pkey_free(pkey);
- if (status == -1)
+ if (status == \-1)
errExit("pkey_free");
exit(EXIT_SUCCESS);