Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my @s = IO::Socket->socketpair(AF_UNIX, SOCK_STREAM, PF_UNIX)
        or die "socketpair: $!\n";
    print "After socketpair() call: $!\n";
    
  2. or download this
    Before socketpair() call: 
    After socketpair() call: Illegal seek
    
  3. or download this
        $) = $run_gid;
        die "Setting egid: $!" if $!;
    
  4. or download this
    socketpair(PF_LOCAL, SOCK_STREAM, 1, [3, 4]) = 0
    ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGET
    +S, 0x7fff3ff30d00) = -1 ENOTTY (Inappropriate ioctl for device)
    ...
    lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
    fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
    fcntl(4, F_SETFD, FD_CLOEXEC)           = 0