清单1-6

#include"apue.h"
#include<errno.h>
int
main(int argc,char *argv[])
{
    fprintf(stderr,"EACCES:%s\n",strerror(EACCES));
    errno=ENOENT;
    perror(argv[0]);
    exit(0);
}

清单1-7 返回 Segmentation fault (core dumped)

#include"apue.h"
int
main(void)
{
    fprintf("uid = %d, gid = %d\n",getuid(),getgid());
    exit(0);
}