view lib/net.c @ 1385:ffc015bddb26 draft 0.4.9

Autodetect --bind and --loop mounts in a way that doesn't interfere with network filesystems or -t newtype mounts that trigger a module load.
author Rob Landley <rob@landley.net>
date Sun, 06 Jul 2014 23:43:29 -0500
parents e11684e3bbc5
children
line wrap: on
line source

#include "toys.h"

int xsocket(int domain, int type, int protocol)
{
  int fd = socket(domain, type, protocol);

  if (fd < 0) perror_exit("socket %x %x", type, protocol);
  return fd;
}